<?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/"
		>
<channel>
	<title>Comments on: Drop down with MooTools</title>
	<atom:link href="http://www.jek2k.com/wp/2008/01/20/drop-down-with-mootools/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jek2k.com/wp/2008/01/20/drop-down-with-mootools/</link>
	<description>still awake at night?</description>
	<lastBuildDate>Sun, 10 Apr 2011 14:58:04 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Blake</title>
		<link>http://www.jek2k.com/wp/2008/01/20/drop-down-with-mootools/comment-page-1/#comment-31489</link>
		<dc:creator>Blake</dc:creator>
		<pubDate>Tue, 26 Oct 2010 20:14:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.jek2k.com/wp/index.php/2008/01/20/drop-down-with-mootools/#comment-31489</guid>
		<description>The event handling function could be a little more efficient:
-------------------start---------------------
                var lp = e.target;
		mySlide.toggle();
		lp.toggleClass(&#039;openPanel&#039;);
		fx.start({
			&#039;opacity&#039;: 0
		}).chain(function(){
			lp.set(&#039;html&#039;, (lp.hasClass(&#039;openPanel&#039;) ? labelClose : labelOpen));
			fx.start({&#039;opacity&#039;: 1})
		});
-------------------end-------------------

Using $ repeatedly as you did above is inefficient and requires much more execution than storing the result of that call in a variable.

Additionally, Mootools does that for you, assuming you&#039;re including the appropriate modules, for events, and stores the result in event.target (e.target in your case).

Also, you should be using the Mootools&#039; Element.set method to set the html, to hide any cross browser issues.

And when doing so, you can inline that if statement with ternary operator for more efficiency.

NJoy!
-Blake</description>
		<content:encoded><![CDATA[<p>The event handling function could be a little more efficient:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-start&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
                var lp = e.target;<br />
		mySlide.toggle();<br />
		lp.toggleClass(&#8217;openPanel&#8217;);<br />
		fx.start({<br />
			&#8216;opacity&#8217;: 0<br />
		}).chain(function(){<br />
			lp.set(&#8217;html&#8217;, (lp.hasClass(&#8217;openPanel&#8217;) ? labelClose : labelOpen));<br />
			fx.start({&#8217;opacity&#8217;: 1})<br />
		});<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-end&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Using $ repeatedly as you did above is inefficient and requires much more execution than storing the result of that call in a variable.</p>
<p>Additionally, Mootools does that for you, assuming you&#8217;re including the appropriate modules, for events, and stores the result in event.target (e.target in your case).</p>
<p>Also, you should be using the Mootools&#8217; Element.set method to set the html, to hide any cross browser issues.</p>
<p>And when doing so, you can inline that if statement with ternary operator for more efficiency.</p>
<p>NJoy!<br />
-Blake</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicolò</title>
		<link>http://www.jek2k.com/wp/2008/01/20/drop-down-with-mootools/comment-page-1/#comment-25732</link>
		<dc:creator>Nicolò</dc:creator>
		<pubDate>Tue, 12 Jan 2010 09:51:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.jek2k.com/wp/index.php/2008/01/20/drop-down-with-mootools/#comment-25732</guid>
		<description>Hey Rich, 
try this link http://line25.com/articles/rounding-up-the-top-10-mootools-lightbox-scripts or search Google for &quot;mootools lightboxes&quot; and you&#039;ll find a few.</description>
		<content:encoded><![CDATA[<p>Hey Rich,<br />
try this link <a href="http://line25.com/articles/rounding-up-the-top-10-mootools-lightbox-scripts" rel="nofollow">http://line25.com/articles/rounding-up-the-top-10-mootools-lightbox-scripts</a> or search Google for &#8220;mootools lightboxes&#8221; and you&#8217;ll find a few.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich</title>
		<link>http://www.jek2k.com/wp/2008/01/20/drop-down-with-mootools/comment-page-1/#comment-25645</link>
		<dc:creator>Rich</dc:creator>
		<pubDate>Fri, 08 Jan 2010 22:22:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.jek2k.com/wp/index.php/2008/01/20/drop-down-with-mootools/#comment-25645</guid>
		<description>Hi Nicolò, firstly have to say a thousand thank you&#039;s for sharing this, its totally open my eyes to javascript. The only problem I&#039;m having is I can&#039;t seem to find a lightbox type script that&#039;ll work on the same page as this drop down with the mootools.full.js. Would you be able to suggest anything or point me in the right direction? Many thanks.</description>
		<content:encoded><![CDATA[<p>Hi Nicolò, firstly have to say a thousand thank you&#8217;s for sharing this, its totally open my eyes to javascript. The only problem I&#8217;m having is I can&#8217;t seem to find a lightbox type script that&#8217;ll work on the same page as this drop down with the mootools.full.js. Would you be able to suggest anything or point me in the right direction? Many thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fb</title>
		<link>http://www.jek2k.com/wp/2008/01/20/drop-down-with-mootools/comment-page-1/#comment-15977</link>
		<dc:creator>fb</dc:creator>
		<pubDate>Thu, 14 Aug 2008 07:18:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.jek2k.com/wp/index.php/2008/01/20/drop-down-with-mootools/#comment-15977</guid>
		<description>Thanks for this tutorial, ill place the link an a mootools portal im working on. http://mootools.startgigant.nl</description>
		<content:encoded><![CDATA[<p>Thanks for this tutorial, ill place the link an a mootools portal im working on. <a href="http://mootools.startgigant.nl" rel="nofollow">http://mootools.startgigant.nl</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicolò</title>
		<link>http://www.jek2k.com/wp/2008/01/20/drop-down-with-mootools/comment-page-1/#comment-14331</link>
		<dc:creator>Nicolò</dc:creator>
		<pubDate>Wed, 18 Jun 2008 17:43:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.jek2k.com/wp/index.php/2008/01/20/drop-down-with-mootools/#comment-14331</guid>
		<description>Thanks Dragan, I&#039;ll give it a try</description>
		<content:encoded><![CDATA[<p>Thanks Dragan, I&#8217;ll give it a try</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dragan</title>
		<link>http://www.jek2k.com/wp/2008/01/20/drop-down-with-mootools/comment-page-1/#comment-14329</link>
		<dc:creator>Dragan</dc:creator>
		<pubDate>Wed, 18 Jun 2008 17:21:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.jek2k.com/wp/index.php/2008/01/20/drop-down-with-mootools/#comment-14329</guid>
		<description>Nice work , I just don&#039;t like that little jerk on page load since it shows the whole hidden panel,. I took the liberty to modify  your friends code and fix that.

here it is , 
download the V2  

open   demo.html  in any ediitor and add this before ending   --&gt;  tag 


#myPanel{
visibility: hidden;
height:0px;
width:500px;
}

now open 

dropdown.js   and add this 

        e = new Event(e);
        $(&#039;myPanel&#039;).setStyle(&#039;visibility&#039;, &#039;visible&#039;);
        $(&#039;myPanel&#039;).setStyle(&#039;height&#039;, &#039;auto&#039;);

after   

	$(&#039;linkPanel&#039;).addEvent(&#039;click&#039;, function(e){


nice work and compliments from youjoomla.com</description>
		<content:encoded><![CDATA[<p>Nice work , I just don&#8217;t like that little jerk on page load since it shows the whole hidden panel,. I took the liberty to modify  your friends code and fix that.</p>
<p>here it is ,<br />
download the V2  </p>
<p>open   demo.html  in any ediitor and add this before ending   &#8211;&gt;  tag </p>
<p>#myPanel{<br />
visibility: hidden;<br />
height:0px;<br />
width:500px;<br />
}</p>
<p>now open </p>
<p>dropdown.js   and add this </p>
<p>        e = new Event(e);<br />
        $(&#8217;myPanel&#8217;).setStyle(&#8217;visibility&#8217;, &#8216;visible&#8217;);<br />
        $(&#8217;myPanel&#8217;).setStyle(&#8217;height&#8217;, &#8216;auto&#8217;);</p>
<p>after   </p>
<p>	$(&#8217;linkPanel&#8217;).addEvent(&#8217;click&#8217;, function(e){</p>
<p>nice work and compliments from youjoomla.com</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stevi3</title>
		<link>http://www.jek2k.com/wp/2008/01/20/drop-down-with-mootools/comment-page-1/#comment-13857</link>
		<dc:creator>Stevi3</dc:creator>
		<pubDate>Mon, 26 May 2008 17:48:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.jek2k.com/wp/index.php/2008/01/20/drop-down-with-mootools/#comment-13857</guid>
		<description>Thank you so much for your insight.  This will help with my web dev skills.  :)</description>
		<content:encoded><![CDATA[<p>Thank you so much for your insight.  This will help with my web dev skills.  <img src='http://www.jek2k.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicolò</title>
		<link>http://www.jek2k.com/wp/2008/01/20/drop-down-with-mootools/comment-page-1/#comment-12905</link>
		<dc:creator>Nicolò</dc:creator>
		<pubDate>Mon, 21 Apr 2008 10:48:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.jek2k.com/wp/index.php/2008/01/20/drop-down-with-mootools/#comment-12905</guid>
		<description>Hi Mike,
that sounds weird, since it has always worked in Firefox. Could you please post an URL so that I can check?</description>
		<content:encoded><![CDATA[<p>Hi Mike,<br />
that sounds weird, since it has always worked in Firefox. Could you please post an URL so that I can check?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Young</title>
		<link>http://www.jek2k.com/wp/2008/01/20/drop-down-with-mootools/comment-page-1/#comment-12800</link>
		<dc:creator>Mike Young</dc:creator>
		<pubDate>Thu, 17 Apr 2008 18:59:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.jek2k.com/wp/index.php/2008/01/20/drop-down-with-mootools/#comment-12800</guid>
		<description>(And also, I&#039;m using Wordpress)</description>
		<content:encoded><![CDATA[<p>(And also, I&#8217;m using Wordpress)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Young</title>
		<link>http://www.jek2k.com/wp/2008/01/20/drop-down-with-mootools/comment-page-1/#comment-12798</link>
		<dc:creator>Mike Young</dc:creator>
		<pubDate>Thu, 17 Apr 2008 18:58:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.jek2k.com/wp/index.php/2008/01/20/drop-down-with-mootools/#comment-12798</guid>
		<description>Hi. This is great, almost got it working on my site.

It&#039;s coming out fine in IE but it&#039;s not revealing the hidden content when in Firefox :S 

Any ideas on this? 

Thanks so much, Loving the website.</description>
		<content:encoded><![CDATA[<p>Hi. This is great, almost got it working on my site.</p>
<p>It&#8217;s coming out fine in IE but it&#8217;s not revealing the hidden content when in Firefox :S </p>
<p>Any ideas on this? </p>
<p>Thanks so much, Loving the website.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

