<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
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:series="http://unfoldingneurons.com/"
> <channel><title>Comments on: Create Twitter-Style Dropdowns Using&#160;jQuery</title> <atom:link href="http://davidwalsh.name/twitter-dropdown-jquery/feed" rel="self" type="application/rss+xml" /><link>http://davidwalsh.name/twitter-dropdown-jquery</link> <description>Legendary scribbles about JavaScript, HTML5, AJAX, PHP, CSS, and ∞.</description> <lastBuildDate>Thu, 09 Feb 2012 10:59:12 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3</generator> <item><title>By: Florian</title><link>http://davidwalsh.name/twitter-dropdown-jquery/comment-page-1#comment-26478</link> <dc:creator>Florian</dc:creator> <pubDate>Thu, 11 Aug 2011 11:34:16 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4930#comment-26478</guid> <description>Better way to toggle menu when parent is clicked:&lt;code&gt;		/* function to show menu when clicked */
dropdown.bind(&#039;click&#039;,function(e) {
if(e) e.stopPropagation();
if(e) e.preventDefault();
if ( dropdown.hasClass(&#039;menu-open&#039;) ) {
hideMenu();
} else {
showMenu();
}
});&lt;/code&gt;</description> <content:encoded><![CDATA[<p>Better way to toggle menu when parent is clicked:</p><p><code> /* function to show menu when clicked */<br
/> dropdown.bind('click',function(e) {<br
/> if(e) e.stopPropagation();<br
/> if(e) e.preventDefault();<br
/> if ( dropdown.hasClass('menu-open') ) {<br
/> hideMenu();<br
/> } else {<br
/> showMenu();<br
/> }<br
/> });</code></p> ]]></content:encoded> </item> <item><title>By: Mattia</title><link>http://davidwalsh.name/twitter-dropdown-jquery/comment-page-1#comment-22813</link> <dc:creator>Mattia</dc:creator> <pubDate>Tue, 22 Feb 2011 15:50:40 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4930#comment-22813</guid> <description>[SOLVED]
I&#039;ve solved using jquery toogle.Here my code:Jquery:
&lt;code&gt;$(document).ready(function(){
$(&#039;#sign_box&#039;).hide();
$(&#039;a.sign_in&#039;).click(function(){
$(&#039;#sign_box&#039;).slideToggle(500);
$(&#039;a.sign_in&#039;).toggleClass(&#039;active&#039;);
return false;
});
});&lt;/code&gt;Html:
&lt;code&gt;
&lt;a href=&quot;#&quot; rel=&quot;nofollow&quot;&gt;Home&lt;/a&gt;
&lt;a href=&quot;#&quot; rel=&quot;nofollow&quot;&gt;Gallery&lt;/a&gt;
&lt;a href=&quot;#&quot; rel=&quot;nofollow&quot;&gt;Contact Us&lt;/a&gt;
&lt;a href=&quot;#&quot; rel=&quot;nofollow&quot;&gt;Private Area&lt;/a&gt;
UserName
Password
&lt;/code&gt;</description> <content:encoded><![CDATA[<p>[SOLVED]<br
/> I&#8217;ve solved using jquery toogle.</p><p>Here my code:</p><p>Jquery:<br
/> <code></p><p>$(document).ready(function(){<br
/> $('#sign_box').hide();<br
/> $('a.sign_in').click(function(){<br
/> $('#sign_box').slideToggle(500);<br
/> $('a.sign_in').toggleClass('active');<br
/> return false;<br
/> });<br
/> });</p><p></code></p><p>Html:<br
/> <code></p><p> <a
href="#" rel="nofollow">Home</a><br
/> <a
href="#" rel="nofollow">Gallery</a><br
/> <a
href="#" rel="nofollow">Contact Us</a></p><p> <a
href="#" rel="nofollow">Private Area</a></p><p> UserName<br
/> Password</p><p></code></p> ]]></content:encoded> </item> <item><title>By: Mattia</title><link>http://davidwalsh.name/twitter-dropdown-jquery/comment-page-1#comment-22812</link> <dc:creator>Mattia</dc:creator> <pubDate>Tue, 22 Feb 2011 14:34:35 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4930#comment-22812</guid> <description>I&#039;ve tried modifing jquery script in this way but no way :(
Where am I worng?&lt;code&gt;
$(document).ready(function()
{
$(&quot;.sign_in&quot;).click(function()
{
$(&quot;#sign_box&quot;).show();
return false;
});
$(&quot;.sign_in&quot;).click(function()
{
$(&#039;.sign_in&#039;).addClass(&#039;active&#039;);
});$(&quot;.sign_in.active&quot;).click(function()
{
$(&quot;#sign_box&quot;).hide();
return false;
});
$(&quot;.sign_in.active&quot;).click(function()
{
$(&#039;.sign_in.active&#039;).removeClass(&#039;active&#039;);
});
});
&lt;/code&gt;Thanks in advance</description> <content:encoded><![CDATA[<p>I&#8217;ve tried modifing jquery script in this way but no way :(<br
/> Where am I worng?</p><p><code><br
/> $(document).ready(function()<br
/> {<br
/> $(".sign_in").click(function()<br
/> {<br
/> $("#sign_box").show();<br
/> return false;<br
/> });<br
/> $(".sign_in").click(function()<br
/> {<br
/> $('.sign_in').addClass('active');<br
/> });</p><p> $(".sign_in.active").click(function()<br
/> {<br
/> $("#sign_box").hide();<br
/> return false;<br
/> });<br
/> $(".sign_in.active").click(function()<br
/> {<br
/> $('.sign_in.active').removeClass('active');<br
/> });<br
/> });</p><p></code></p><p>Thanks in advance</p> ]]></content:encoded> </item> <item><title>By: Mattia</title><link>http://davidwalsh.name/twitter-dropdown-jquery/comment-page-1#comment-22809</link> <dc:creator>Mattia</dc:creator> <pubDate>Tue, 22 Feb 2011 11:35:49 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4930#comment-22809</guid> <description>I too would like to know how to make the dropdown close when pressing the up arrow/menu1</description> <content:encoded><![CDATA[<p>I too would like to know how to make the dropdown close when pressing the up arrow/menu1</p> ]]></content:encoded> </item> <item><title>By: Shawn Holman</title><link>http://davidwalsh.name/twitter-dropdown-jquery/comment-page-1#comment-22718</link> <dc:creator>Shawn Holman</dc:creator> <pubDate>Sun, 13 Feb 2011 21:24:09 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4930#comment-22718</guid> <description>I need help to make it active please help me</description> <content:encoded><![CDATA[<p>I need help to make it active please help me</p> ]]></content:encoded> </item> <item><title>By: Shawn Holman</title><link>http://davidwalsh.name/twitter-dropdown-jquery/comment-page-1#comment-22717</link> <dc:creator>Shawn Holman</dc:creator> <pubDate>Sun, 13 Feb 2011 21:22:49 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4930#comment-22717</guid> <description>Hi! I just remade the JS but for some reason the JS that i used it does not make the button active. I used onclicks on the menu znd here is the JS that I used:
&lt;code&gt;function showmenu1()
{
$(&#039;#dropdown1&#039;).fadeToggle();
$(&#039;#dropdown2&#039;).fadeOut();
}
function showmenu2()
{
$(&#039;#dropdown2&#039;).fadeToggle();
$(&#039;#dropdown1&#039;).fadeOut();
}&lt;/code&gt;This is more simple and to exit out the box all you have to do is click on the button agian, not outside</description> <content:encoded><![CDATA[<p>Hi! I just remade the JS but for some reason the JS that i used it does not make the button active. I used onclicks on the menu znd here is the JS that I used:<br
/> <code></p><p>function showmenu1()<br
/> {<br
/> $('#dropdown1').fadeToggle();<br
/> $('#dropdown2').fadeOut();<br
/> }<br
/> function showmenu2()<br
/> {<br
/> $('#dropdown2').fadeToggle();<br
/> $('#dropdown1').fadeOut();<br
/> }</p><p> </code></p><p>This is more simple and to exit out the box all you have to do is click on the button agian, not outside</p> ]]></content:encoded> </item> <item><title>By: Gfoo</title><link>http://davidwalsh.name/twitter-dropdown-jquery/comment-page-1#comment-21330</link> <dc:creator>Gfoo</dc:creator> <pubDate>Tue, 16 Nov 2010 11:18:29 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4930#comment-21330</guid> <description>I too would like to know how to make the dropdown close when pressing the up arrow/menu1</description> <content:encoded><![CDATA[<p>I too would like to know how to make the dropdown close when pressing the up arrow/menu1</p> ]]></content:encoded> </item> <item><title>By: Zef</title><link>http://davidwalsh.name/twitter-dropdown-jquery/comment-page-1#comment-20161</link> <dc:creator>Zef</dc:creator> <pubDate>Wed, 22 Sep 2010 18:54:41 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4930#comment-20161</guid> <description>Thanks alot man exactly what I was after!</description> <content:encoded><![CDATA[<p>Thanks alot man exactly what I was after!</p> ]]></content:encoded> </item> <item><title>By: Peo</title><link>http://davidwalsh.name/twitter-dropdown-jquery/comment-page-1#comment-20105</link> <dc:creator>Peo</dc:creator> <pubDate>Mon, 20 Sep 2010 11:03:16 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4930#comment-20105</guid> <description>I&#039;m sorry, i am reffering to: mike June 10, 2010 @ 10:30 am</description> <content:encoded><![CDATA[<p>I&#8217;m sorry, i am reffering to: mike June 10, 2010 @ 10:30 am</p> ]]></content:encoded> </item> <item><title>By: Peo</title><link>http://davidwalsh.name/twitter-dropdown-jquery/comment-page-1#comment-20104</link> <dc:creator>Peo</dc:creator> <pubDate>Mon, 20 Sep 2010 11:01:31 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4930#comment-20104</guid> <description>I would like to second this question, as the menu emulates the drop-down element of a form - wich has this behavior.</description> <content:encoded><![CDATA[<p>I would like to second this question, as the menu emulates the drop-down element of a form &#8211; wich has this behavior.</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 4/20 queries in 0.019 seconds using disk: basic
Object Caching 866/873 objects using disk: basic

Served from: davidwalsh.name @ 2012-02-09 08:32:52 -->
