<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>dom111.co.uk &#187; drop-down navigation</title>
	<atom:link href="http://www.dom111.co.uk/blog/tag/drop-down-navigation/feed" rel="self" type="application/rss+xml" />
	<link>http://www.dom111.co.uk/blog</link>
	<description>Move along. Nothing to see here.</description>
	<lastBuildDate>Wed, 14 Jul 2010 19:30:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Dropdownify &#8211; Minimal effort dropdown</title>
		<link>http://www.dom111.co.uk/blog/coding/dropdownify-minimal-effort-dropdown/218</link>
		<comments>http://www.dom111.co.uk/blog/coding/dropdownify-minimal-effort-dropdown/218#comments</comments>
		<pubDate>Wed, 27 Jan 2010 12:19:38 +0000</pubDate>
		<dc:creator>dom111</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[drop-down]]></category>
		<category><![CDATA[drop-down menu]]></category>
		<category><![CDATA[drop-down navigation]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[top nav]]></category>

		<guid isPermaLink="false">http://www.dom111.co.uk/blog/?p=218</guid>
		<description><![CDATA[So recently I was asked to change a navigation style of an existing site to drop-down menus. Simple, I thought, just use one of the many existing drop-down plugins. I tried many, but most seemed to use hardcoded styles and I had a few problems (some of which I encountered again, writing this). So I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>So recently I was asked to change a navigation style of an existing site to drop-down menus.</p>
<p>Simple, I thought, just use one of the many existing drop-down plugins. I tried many, but most seemed to use hardcoded styles and I had a few problems (some of which I encountered again, writing this).</p>
<p>So I&#8217;ve made this, I think it&#8217;s fairly robust, but I&#8217;m sure there&#8217;ll be problems with embedded objects (flash) and select boxes (in <= IE6), but for my needs, it sufficed, so I thought I'd share, in case anyone else needs a simple script to manage drop-downs.</p>
<p>To use, create a nest of elements like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;ul id=&quot;top&quot;&gt;
  &lt;li&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;</pre></div></div>

<p>or something similar (any elements, <strong><em>should</em></strong> work) and call:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// jQuery:</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'ul#top'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">dropdownify</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// mootools</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'top'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">dropdownify</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Which should create a simple drop-down.</p>
<p>There are a couple of examples, <a href="/files/dropdownify/jquery">one for jQuery</a> and <a href="/files/dropdownify/mootools">one for mootools</a>, and the files can downloaded <a href="/files/dropdownify/jquery.dropdownify-0.1.tar.gz">here</a> and <a href="/files/dropdownify/dropdownify-0.1.tar.gz">here</a>.</p>
<p>I did encounter a problem with IE, mainly due to z-index faults, so with HTML code like the following:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div class=&quot;nav-wrapper&quot;&gt;
  &lt;ul id=&quot;top&quot;&gt;
    &lt;li&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;</pre></div></div>

<p>I used the following CSS:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">div.nav-wrapper<span style="color: #00AA00;">,</span>
div<span style="color: #6666ff;">.nav-wrapper</span> ul<span style="color: #00AA00;">,</span>
div<span style="color: #6666ff;">.nav-wrapper</span> ul li <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">static</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">100</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.dom111.co.uk/blog/coding/dropdownify-minimal-effort-dropdown/218/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
