<?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>BlogmyQuery - BMQ &#187; Javascript</title>
	<atom:link href="http://blogmyquery.com/index.php/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogmyquery.com</link>
	<description></description>
	<lastBuildDate>Fri, 10 Sep 2010 13:42:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Minimise file size with the YUI Compressor TextMate Bundle</title>
		<link>http://blogmyquery.com/index.php/2010/08/minimise-file-size-with-the-yui-compressor-textmate-bundle/</link>
		<comments>http://blogmyquery.com/index.php/2010/08/minimise-file-size-with-the-yui-compressor-textmate-bundle/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 20:03:52 +0000</pubDate>
		<dc:creator>Roger Johansson</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Feeds]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[kranthi]]></category>

		<guid isPermaLink="false">http://www.456bereastreet.com/archive/201008/minimise_file_size_with_the_yui_compressor_textmate_bundle/</guid>
		<description><![CDATA[Itâ€™s quite obvious that the smaller the files that make up your website are, the less time your visitors will wait for them to download. One way of reducing file sizes is minimising JavaScript and CSS files by removing comments and whitespace, a...]]></description>
			<content:encoded><![CDATA[<p class="preamble">Itâ€™s quite obvious that the smaller the files that make up your website are, the less time your visitors will wait for them to download. One way of reducing file sizes is minimising JavaScript and CSS files by removing comments and whitespace, among other things.</p>

<p>To do that, you can either let the server do it for you or minimise the files yourself before uploading them to the server. Letting the server do it automatically is probably the most convenient way since you don't have to remember to do it. But it isn't practical or possible for everyone to use something like <a href="http://code.google.com/p/minify/">minify</a>, so sometimes you'll need to do it manually.</p>

<p>That may sound like more trouble than it's worth. Luckily for us TextMate users there's a handy <a href="http://mattkirman.com/2009/11/13/yui-compressor-textmate-bundle/">YUI Compressor TextMate bundle</a> that makes it almost as transparent as the server-side solution.</p><p><a href="http://www.456bereastreet.com/archive/201008/minimise_file_size_with_the_yui_compressor_textmate_bundle/">Read full post</a></p><p>Posted in <a href="http://www.456bereastreet.com/archive/categories/css/" rel="tag">CSS</a>, <a href="http://www.456bereastreet.com/archive/categories/coding/" rel="tag">Coding</a>, <a href="http://www.456bereastreet.com/archive/categories/javascript/" rel="tag">JavaScript</a>.</p>
<p><a href="http://feedads.g.doubleclick.net/~a/seT64B6HU0ch8-bHOSDKV4fNEm4/0/da"><img src="http://feedads.g.doubleclick.net/~a/seT64B6HU0ch8-bHOSDKV4fNEm4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/seT64B6HU0ch8-bHOSDKV4fNEm4/1/da"><img src="http://feedads.g.doubleclick.net/~a/seT64B6HU0ch8-bHOSDKV4fNEm4/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/456bereastreet?a=tc3biBNAX2w:o4DiyGSFozE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/456bereastreet?i=tc3biBNAX2w:o4DiyGSFozE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/456bereastreet?a=tc3biBNAX2w:o4DiyGSFozE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/456bereastreet?i=tc3biBNAX2w:o4DiyGSFozE:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/456bereastreet?a=tc3biBNAX2w:o4DiyGSFozE:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/456bereastreet?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/456bereastreet?a=tc3biBNAX2w:o4DiyGSFozE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/456bereastreet?i=tc3biBNAX2w:o4DiyGSFozE:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/456bereastreet/~4/tc3biBNAX2w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogmyquery.com/index.php/2010/08/minimise-file-size-with-the-yui-compressor-textmate-bundle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Plugin Checklist: Should You Use That jQuery Plug-In?</title>
		<link>http://blogmyquery.com/index.php/2010/08/jquery-plugin-checklist-should-you-use-that-jquery-plug-in/</link>
		<comments>http://blogmyquery.com/index.php/2010/08/jquery-plugin-checklist-should-you-use-that-jquery-plug-in/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 10:42:54 +0000</pubDate>
		<dc:creator>Jon Raasch</dc:creator>
				<category><![CDATA[Feeds]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[kranthi]]></category>

		<guid isPermaLink="false">http://www.smashingmagazine.com/?p=56924</guid>
		<description><![CDATA[<table width="650"><tr><td width="650"><div> <img src="http://creatives.commindo-media.de/static/smashing-magazine-advertisement.gif" alt="" border="0" /><img src="http://imp.constantcontact.com/imp/cmp.jsp?impcc=IMP_&#60;mprid/&#62;&#38;o=http://img.constantcontact.com/lp/images/standard/spacer.gif" alt="" border="0" width="1" height="1" /><br /> <a href="http://creatives.commindo-media.de/www/delivery/ck.php?zoneid=56" target="_blank"><img src="http://creatives.commindo-media.de/www/delivery/avw.php?zoneid=56" border="0" alt="" /></a>&#160;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=35" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=35" border="0" alt="" /></a>&#160;<a href="http://creatives.commindo-media.de/www/delivery/ck.php?zoneid=64" target="_blank"><img src="http://creatives.commindo-media.de/www/delivery/avw.php?zoneid=64" border="0" alt="" /></a></div></td></tr></table><p>jQuery plug-ins provide an excellent way to save time and streamline development, allowing programmers to avoid having to build every component from scratch. But plug-ins are also a wild card that introduce an element of uncertainty into any code base. A good plug-in saves countless development hours; a bad plug-in leads to bug fixes that take longer than actually building the component from scratch.</p><p><a href="http://www.smashingmagazine.com/2010/08/26/jquery-plugin-checklist-should-you-use-that-jquery-plug-in"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/08/jquery21.gif" alt="jQuery logo" width="439" height="127" class="aligncenter size-full wp-image-57094" /></a></p> <p>Fortunately, one usually has a number of different plug-ins to choose from. But even if you have only one, figure out whether it's worth using at all. The last thing you want to do is introduce bad code into your code base. The first step is to figure out whether you even need a plug-in. If you donâ€™t, youâ€™ll save yourself both file size and time.</p>]]></description>
			<content:encoded><![CDATA[<table width="650"><tr><td width="650"><div style="width:650px;"> <img src="http://creatives.commindo-media.de/static/smashing-magazine-advertisement.gif" alt="Smashing-magazine-advertisement in jQuery Plugin Checklist: Should You Use That jQuery Plug-In?" border="0" /><img src="http://imp.constantcontact.com/imp/cmp.jsp?impcc=IMP_&#60;mprid/&#62;&#038;o=http://img.constantcontact.com/lp/images/standard/spacer.gif" alt="Spacer in jQuery Plugin Checklist: Should You Use That jQuery Plug-In?" border="0" width="1" height="1" /><br /> <a href="http://creatives.commindo-media.de/www/delivery/ck.php?zoneid=56" ><img src="http://creatives.commindo-media.de/www/delivery/avw.php?zoneid=56" border="0" alt=" in jQuery Plugin Checklist: Should You Use That jQuery Plug-In?"  /></a>&nbsp;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=35" ><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=35" border="0" alt=" in jQuery Plugin Checklist: Should You Use That jQuery Plug-In?"  /></a>&nbsp;<a href="http://creatives.commindo-media.de/www/delivery/ck.php?zoneid=64" ><img src="http://creatives.commindo-media.de/www/delivery/avw.php?zoneid=64" border="0" alt=" in jQuery Plugin Checklist: Should You Use That jQuery Plug-In?"  /></a></div></td></tr></table><p>jQuery plug-ins provide an excellent way to save time and streamline development, allowing programmers to avoid having to build every component from scratch. But plug-ins are also a wild card that introduce an element of uncertainty into any code base. A good plug-in saves countless development hours; a bad plug-in leads to bug fixes that take longer than actually building the component from scratch.</p><p>Fortunately, one usually has a number of different plug-ins to choose from. But even if you have only one, figure out whether it&#8217;s worth using at all. The last thing you want to do is introduce bad code into your code base.</p><p class="offtopic">[Offtopic: by the way, did you know that we are publishing a Smashing eBook Series? The brand new eBook #3 is <a href="https://shop.smashingmagazine.com/smashingbook-dispatcher.php?d=smashing-ebook-mastering-photoshop">Mastering Photoshop For Web Design</a>, written by our Photoshop-expert Thomas Giannattasio.]</p><h3>Do You Need A Plug-In At All?</h3><p>The first step is to figure out whether you even need a plug-in. If you don&#8217;t, youâ€™ll save yourself both file size and time.</p><h4>1. Would Writing It Yourself Be Better?</h4><p>If the functionality is simple enough, you could consider writing it yourself. jQuery plug-ins often come bundled with a wide variety of features, which might be overkill for your situation. In these cases, writing any simple functionality by hand often makes more sense. Of course, the benefits have to be weighed against the amount of work involved.</p><p>For example, jQuery UI&#8217;s <a href="http://docs.jquery.com/UI/Accordion">accordion</a> is great if you need advanced functionality, but it might be overkill if you just need panels that open and close. If you don&#8217;t already use jQuery UI elsewhere on your website, consider instead the native jQuery <code>slideToggle()</code> or <code>animate()</code>.</p><h4>2. Is It Similar to a Plug-In You&#8217;re Already Using?</h4><p>After discovering that a particular plug-in doesn&#8217;t handle everything you need, finding another plug-in to cover loose ends might be tempting. But including two similar plug-ins in the same app is a sure path to bloated JavaScript.</p><p>Can you find a single plug-in that covers everything you need? If not, can you extend one of the plug-ins you have to cover everything you need? Again, in deciding whether to extend a plug-in, weigh the benefits against the development time involved.</p><p>For example, <a href="http://leandrovieira.com/projects/jquery/lightbox/">jQuery lightbox</a> is a nice way to enable pop-up photos in a gallery, and <a href="http://www.ericmmartin.com/projects/simplemodal/">simpleModal</a> is a great way to display modal messages to users. But why would you use both on the same website? You could easily extend one to cover both uses. Better yet, find one plug-in that covers everything, such as <a href="http://colorpowered.com/colorbox/">Colorbox</a>.</p><h4>3. Do You Even Need JavaScript?</h4><p>In some situations, JavaScript isn&#8217;t needed at all. CSS pseudo-selectors such as <code>:hover</code> and <a href="http://net.tutsplus.com/tutorials/html-css-techniques/css-fundametals-css-3-transitions/">CSS3 transitions</a> can cover a variety of dynamic functionality much faster than a comparable JavaScript solution. Also, many plug-ins apply only styling; doing this with mark-up and CSS might make more sense.</p><p>For example, plug-ins such as <a href="http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/">jQuery Tooltip</a> are indispensable if you have dynamic content that requires well-placed tooltips. But if you use tooltips in only a few select locations, using pure CSS is better (<a href="http://sixrevisions.com/css/css-only-tooltips/">see this example</a>). You can take static tooltips a step further by animating the effect using a CSS3 transition, but bear in mind that the animation will work only in certain browsers.</p><h3>Avoid Red Flags</h3><p>When reviewing any plug-in, a number of warning signs will indicate poor quality. Here, we&#8217;ll look at all aspects of plug-ins, from the JavaScript to the CSS to the mark-up. We&#8217;ll even consider how plug-ins are released. None of these red flags alone should eliminate any plug-in from consideration. You get what you pay for, and because you&#8217;re probably paying nothing, you should be willing to cut any one a bit of slack.</p><p>If you&#8217;re fortunate enough to have more than one option, these warning signs could help you narrow down your choice. But even if you have only one option, be prepared to forgo it if you see too many red flags. Save yourself the headache <em>ahead</em> of time.</p><h4>4. Weird Option or Argument Syntax</h4><p>After using jQuery for a while, developers get a sense of how most functions accept arguments. If a plug-in developer uses unusual syntax, it stands to reason that they don&#8217;t have much jQuery or JavaScript experience.</p><p>Some plug-ins accept a jQuery object as an argument but don&#8217;t allow chaining from that object; for example, <code>$.myPlugin( $('a') );</code> but not <code>$('a').myPlugin();</code> This is a big red flag.</p><p>A green flag would be a plug-in in this formatâ€¦</p><p><pre class="brush: js">$('.my-selector').myPlugin({
 opt1 : 75,
 opt2 : 'asdf'
});</pre></p><p>â€¦ that also acceptsâ€¦</p><p><pre class="brush: js">$.myPlugin({
 opt1 : 75,
 opt2 : 'asdf'
}, $('.my-selector'));</pre></p><h4>5. Little to No Documentation</h4><p>Without documentation, a plug-in can be very difficult to use, because that is the first place you look for answers to your questions. Documentation comes in a variety of formats; proper documentation is best, but well-commented code can work just as well. If documentation doesn&#8217;t exist or is just a blog post with a quick example, then you might want to consider other options.</p><p>Good documentation shows that the plug-in creator cares about users like you. It also shows that they have dug into other plug-ins enough to know the value of good documentation.</p><h4>6. Poor History of Support</h4><p>Lack of support indicates that finding help will be difficult when issues arise. More tellingly, it indicates that the plug-in has not been updated in a while. One advantage of open-source software is all of the eye-balls that are debugging and improving it. If the author never speaks to these people, the plug-in won&#8217;t grow.</p><p>When was the last time the plug-in you&#8217;re considering was updated? When was the last time a support request was answered? While not all plug-ins need as robust a support system as the <a href="http://plugins.jquery.com/">jQuery plug-ins website</a>, be wary of plug-ins that have never been modified.</p><p>A documented history of support, in which the author has responded to both bug and enhancement requests, is a green flag. A support forum further indicates that the plug-in is well supported, if not by the author then at least by the community.</p><h4>7. No Minified Version</h4><p>Though a fairly minor red flag, if the plug-in&#8217;s creator doesn&#8217;t provide a <a href="http://developer.yahoo.net/blog/archives/2007/07/high_performanc_8.html">minified</a> version along with the source code, then they may not be overly concerned with performance. Sure, you could minify it yourself, but this red flag isn&#8217;t about wasted time: it&#8217;s about the possibility that the plug-in contains far worse performance issues.</p><p>On the other hand, providing a minified, packed and <a href="http://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/">gzipped</a> version in the download package is an indication that the author cares about JavaScript performance.</p><h4>8. Strange Mark-Up Requirements</h4><p>If a plug-in requires mark-up, then the mark-up should be of high quality. It should make <a href="http://blue-anvil.com/archives/guide-to-semantic-mark-up/">semantic sense</a> and be flexible enough for your purposes. Besides indicating poor front-end skills, strange mark-up makes integration more difficult. A good plug-in plugs into just about any mark-up you use; a bad plug-in makes you jump through hoops.</p><p>In certain situations, more rigid mark-up is needed, so be prepared to judge this on a sliding scale. Basically, the more specific the functionality, the more specific the mark-up needed. Completely flexible mark-up that descends naturally from any jQuery selector is the easiest to integrate.</p><h4>9. Excessive CSS</h4><p>Many jQuery plug-ins come packaged with CSS, and the quality of the style sheets is just as important as the JavaScript. An excessive number of styles is a sure sign of bad CSS. But what constitutes &#8220;excessive&#8221; depends on the purpose of the plug-in. Something very display-heavy, such as a lightbox or UI plug-in, will need more CSS than something that drives a simple animation.</p><p>Good CSS styles a plug-in&#8217;s content effectively while allowing you to easily modify the styles to fit your theme.</p><h4>10. No One Else Uses It</h4><p>With the sheer volume of jQuery users, most decent plug-ins will probably have something written about them, even if it&#8217;s a &#8220;50 jQuery [fill in the blank]&#8221; post. Do a simple Google search for the plug-in. If you get very few results, you might want to consider another option, unless the plug-in is brand new or you can verifiy that it is written by a professional.</p><p>Posts on prominent blogs are great, and posts by prominent jQuery programmers are even better.</p><h3>Final Assessment</h3><p>After you&#8217;ve given the plug-in the third degree, the only thing left to do is plug it in and test how well it performs.</p><h4>11. Plug It In and See</h4><p>Probably the best way to test a plug-in is to simply plug it on the development server and see the results. First, does it break anything? Make sure to look at JavaScript in the surrounding areas. If the plug-in includes a style sheet, look for layout and styling errors on any page that applies the style sheet.</p><p>Additionally, how does the plug-in perform? If it runs slowly or the page lags considerably when loading, it might be important to consider other options.</p><h4>12. Benchmarking With JSPerf</h4><p>To take your performance review to the next level, run a benchmark test using <a href="http://jsperf.com">JSPerf</a>. <a href="http://en.wikipedia.org/wiki/Benchmark_(computing)">Benchmarking</a> basically runs a set of operations a number of times, and then returns an average of how long it took to execute. JSPerf provides an easy way to test how quickly a plug-in runs. This can be a great way to pick a winner between two seemingly identical plug-ins.</p><p><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/08/jsperf.png" alt="Jsperf in jQuery Plugin Checklist: Should You Use That jQuery Plug-In?" width="500" height="133" class="size-full wp-image-56927" /><br /> <em>An example of a performance test run in jsPerf.</em></p><h4>13. Cross-Browser Testing</h4><p>If a plug-in comes with a lot of CSS, make sure to test the styling in all of the browsers that you want to support. Bear in mind that CSS can be drawn from external style sheets or from within the JavaScript itself.</p><p>Even if the plug-in doesn&#8217;t have any styling, check for JavaScript errors across browsers anyway (at least in the earliest version of IE that you support). jQuery&#8217;s core handles most cross-browser issues, but plug-ins invariably use some amount of pure JavaScript, which tends to break in older browsers.</p><h4>14. Unit Testing</h4><p>Finally, you may want to consider taking cross-browser testing even further with <a href="http://en.wikipedia.org/wiki/Unit_testing">unit tests</a>. Unit testing provides a simple way to test individual components of a plug-in in any browser or platform you want to support. If the plug-in&#8217;s author has included unit tests in their release, you can bet that all components of the plug-in will work across browsers and platforms.</p><p>Unfortunately, very few plug-ins include unit test data, but that doesn&#8217;t mean you can&#8217;t perform your own test using the <a href="http://docs.jquery.com/QUnit">QUnit plug-in</a>.</p><p>With minimal set-up, you can test whether the plug-in methods return the desired results. If any test fails, don&#8217;t waste your time with the plug-in. In most cases, performing your own unit tests is overkill, but QUnit helps you determine the quality of a plug-in when it really counts. For more information on how to use QUnit, <a href="http://net.tutsplus.com/tutorials/javascript-ajax/how-to-test-your-javascript-code-with-qunit/">see this tutorial</a></p><p><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/08/qunit-example.png" alt="Qunit-example in jQuery Plugin Checklist: Should You Use That jQuery Plug-In?" width="500" height="333" class="alignnone size-full wp-image-56928" /><br /> <em>An example of a unit test run in QUnit.</em></p><h3>Conclusion</h3><p>When assessing the quality of a jQuery plug-in, look at all levels of the code. Is the JavaScript optimized and error-free? Is the CSS tuned and effective? Does the mark-up make semantic sense and have the flexibility you need? These questions all lead to the most important question: will this plug-in be easy to use?</p><p>jQuery core has been optimized and bug-checked not only by the core team but by the entire jQuery community. While holding jQuery plug-ins to the same standard would be unfair, they should stand up to at least some of that same scrutiny.</p><h3>Related Posts</h3><p>You may be interested in the following related posts:</p><ul><li><a href="http://www.smashingmagazine.com/2010/08/04/commonly-confused-bits-of-jquery/">Commonly Confused Bits Of jQuery</a></li><li><a href="http://www.smashingmagazine.com/2010/06/15/spice-up-your-website-with-jquery-goodness/">Spicing Up Your Website With jQuery Goodness</a></li><li><a href="http://www.smashingmagazine.com/2008/09/16/jquery-examples-and-best-practices/">jQuery and JavaScript Coding: Examples and Best Practices</a></li><li><a href="http://www.smashingmagazine.com/2010/04/27/45-useful-jquery-techniques-and-plugins/">45 Useful jQuery Techniques and Plugins</a></li></ul><p><em>(al)</em></p><p></p><hr /><p><small>Â© Jon Raasch for <a href="http://www.smashingmagazine.com">Smashing Magazine</a>, 2010. | <a href="http://www.smashingmagazine.com/2010/08/26/jquery-plugin-checklist-should-you-use-that-jquery-plug-in/">Permalink</a> | <a href="http://www.smashingmagazine.com/2010/08/26/jquery-plugin-checklist-should-you-use-that-jquery-plug-in/#comments">Post a comment</a> | <a title="Bookmark in del.icio.us" href="http://del.icio.us/post?url=http://www.smashingmagazine.com/2010/08/26/jquery-plugin-checklist-should-you-use-that-jquery-plug-in/&title=jQuery Plugin Checklist: Should You Use That jQuery Plug-In?">Add to del.icio.us</a> | <a title="Bookmark in Digg" href="http://digg.com/submit?phase=2&url=http://www.smashingmagazine.com/2010/08/26/jquery-plugin-checklist-should-you-use-that-jquery-plug-in/">Digg this</a> | <a title="Stumble on StumbleUpon" href="http://www.stumbleupon.com/submit?url=http://www.smashingmagazine.com/2010/08/26/jquery-plugin-checklist-should-you-use-that-jquery-plug-in/">Stumble on StumbleUpon!</a> | <a title="Tweet us!" href="http://twitter.com/home?status=@tweetmeme%20@smashingmag%20Reading%20'jQuery Plugin Checklist: Should You Use That jQuery Plug-In?' http://www.smashingmagazine.com/2010/08/26/jquery-plugin-checklist-should-you-use-that-jquery-plug-in/">Tweet it!</a> | <a title="Bookmark in Reddit" href="http://reddit.com/submit?url=http://www.smashingmagazine.com/2010/08/26/jquery-plugin-checklist-should-you-use-that-jquery-plug-in/">Submit to Reddit</a> | <a href="http://forum.smashingmagazine.com/">Forum Smashing Magazine</a><br/> Post tags: <a href="http://www.smashingmagazine.com/tag/coding/" rel="tag">Coding</a>, <a href="http://www.smashingmagazine.com/tag/javascript/" rel="tag">javascript</a>, <a href="http://www.smashingmagazine.com/tag/jquery/" rel="tag">jquery</a><br/> </small></p>]]></content:encoded>
			<wfw:commentRss>http://blogmyquery.com/index.php/2010/08/jquery-plugin-checklist-should-you-use-that-jquery-plug-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Three Kick-Ass Web Developer Tutorials</title>
		<link>http://blogmyquery.com/index.php/2010/08/three-kick-ass-web-developer-tutorials/</link>
		<comments>http://blogmyquery.com/index.php/2010/08/three-kick-ass-web-developer-tutorials/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 09:11:10 +0000</pubDate>
		<dc:creator>speckyboy</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Feeds]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://designreviver.com/?p=9112</guid>
		<description><![CDATA[Sometimes to get your development juices flowing you just need a meaty project or an in-depth tutorial that you can sink your teeth into and lose yourself for a few hours in coding bliss. And that&#8217;s what we have for you today, three tutorials that will satisfy your code craving! They are not only roll-up-your-sleeves [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes to get your development juices flowing you just need a meaty project or an in-depth tutorial that you can sink your teeth into and lose yourself for a few hours in coding bliss. And that&#8217;s what we have for you today, three tutorials that will satisfy your code craving! They are not only roll-up-your-sleeves and put-on-a-pot-of-coffee good but they will also introduce you to some of the latest CSS3, HTML5 and jQuery techniques.</p>
<p><span id="more-9112"></span></p>
<h4><a href="http://addyosmani.com/blog/wanderwall/">A jQuery, CSS3 &#38; HTML5 Hover-Based Interface</a></h4>
<p><a href="http://addyosmani.com/blog/wanderwall/"><img src="http://designreviver.com/wp-content/uploads/2010/08/dr_tut_01.jpg" alt="A jQuery, CSS3 &#38; HTML5 Hover-Based Interface" width="520"></a></p>
<p>In this awesome tutorial you will learn how to create a useful hover-based user interface using jQuery, CSS3, HTML5 and @font-face. The project youâ€™ll be creating could easily be used for a portfolio or business site and the concepts youâ€™ll learn could certainly be used to expand the idea further.<br /><a href="http://addyosmani.com/blog/wanderwall/">A jQuery, CSS3 &#38; HTML5 Hover-Based Interface</a></p>
<h4><a href="http://tutorialzine.com/2010/08/dynamic-faq-jquery-yql-google-docs/">Dynamic FAQ Section w/ jQuery, YQL &#38; Google Docs</a></h4>
<p><a href="http://tutorialzine.com/2010/08/dynamic-faq-jquery-yql-google-docs/"><img src="http://designreviver.com/wp-content/uploads/2010/08/dr_tut_02.jpg" alt="Dynamic FAQ Section w/ jQuery, YQL &#38; Google Docs" width="520"></a></p>
<p>In this tutorial, you will build a dynamic FAQ section. The script, with the help of jQuery &#38; YQL, will pull the contents of a shared spreadsheet in your Google Docs account, and use the data to populate the FAQ section with questions and answers.<br /><a href="http://tutorialzine.com/2010/08/dynamic-faq-jquery-yql-google-docs/">Dynamic FAQ Section w/ jQuery, YQL &#38; Google Docs</a></p>
<h4><a href="http://www.catswhocode.com/blog/how-to-easily-create-charts-using-jquery-and-html5">How to easily create charts using jQuery and HTML5</a></h4>
<p><a href="http://www.catswhocode.com/blog/how-to-easily-create-charts-using-jquery-and-html5"><img src="http://designreviver.com/wp-content/uploads/2010/08/dr_tut_03.jpg" alt="How to easily create charts using jQuery and HTML5" width="520"></a></p>
<p>For years, Flash was the only solution to display a dynamic chart on a website. But thanks to modern techniques, the dying Flash isn&#39;t needed anymore. In this tutorial,you&#39;ll be shown how easy it is to transform a basic HTML table into a profesionnal looking chart using visualize.js, a very useful jQuery plugin.<br /><a href="http://www.catswhocode.com/blog/how-to-easily-create-charts-using-jquery-and-html5">How to easily create charts using jQuery and HTML5</a></p>
<p>By Paul Andrew (<a href="http://speckyboy.com">Speckyboy</a>and <a href="http://twitter.com/speckyboy">speckyboy@twitter</a>).</p>
<img src="http://feeds.feedburner.com/~r/DesignReviver/~4/05Hw48N6W38" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogmyquery.com/index.php/2010/08/three-kick-ass-web-developer-tutorials/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PaintbrushJS</title>
		<link>http://blogmyquery.com/index.php/2010/08/paintbrushjs/</link>
		<comments>http://blogmyquery.com/index.php/2010/08/paintbrushjs/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 19:34:29 +0000</pubDate>
		<dc:creator>SimpleBits</dc:creator>
				<category><![CDATA[Feeds]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[kranthi]]></category>

		<guid isPermaLink="false">http://stream.simplebits.com/post/973276117</guid>
		<description><![CDATA[PaintbrushJS: New from Dave Shea, â€œâ€¦a lightweight, browser-based image processing library that can apply various visual filters to images within a web page.â€�
Iâ€™m salivating just thinking of the possibilities here. Be sure to c...]]></description>
			<content:encoded><![CDATA[<a href="http://github.com/mezzoblue/PaintbrushJS">PaintbrushJS</a>: <p>New from <a href="http://mezzoblue.com">Dave Shea</a>, â€œâ€¦a lightweight, browser-based image processing library that can apply various visual filters to images within a web page.â€�</p>
<p>Iâ€™m salivating just thinking of the possibilities here. Be sure to check out <a href="http://mezzoblue.github.com/PaintbrushJS/demo/">the demo</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blogmyquery.com/index.php/2010/08/paintbrushjs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using PHP Show Different Content to Visitors From a Specific Country</title>
		<link>http://blogmyquery.com/index.php/2010/08/using-php-show-different-content-to-visitors-from-a-specific-country/</link>
		<comments>http://blogmyquery.com/index.php/2010/08/using-php-show-different-content-to-visitors-from-a-specific-country/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 13:31:19 +0000</pubDate>
		<dc:creator>speckyboy</dc:creator>
				<category><![CDATA[Feeds]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://designreviver.com/?p=8917</guid>
		<description><![CDATA[Our topic for today&#8217;s Design Reviver Answers news round-up is a question that was recently asked on PHP. And to be more specific the question was How Do I Show Different Content to Visitors From a Specific Country Using PHP?
Do you have an alternative solution, maybe a fresher technique? You can leave your comment below, [...]]]></description>
			<content:encoded><![CDATA[<p>Our topic for today&#8217;s Design Reviver Answers news round-up is a question that was recently asked on PHP. And to be more specific the question was <a href="http://designreviver.com/answers/18459/">How Do I Show Different Content to Visitors From a Specific Country Using PHP?</a></p>
<p>Do you have an alternative solution, maybe a fresher technique? You can leave your comment below, or you can leave a your answer on the original question on Answers <a href="http://designreviver.com/answers/18459/">here</a></p>
<p><span id="more-8917"></span></p>
<h4>How Do I Show Different Content to Visitors From a Specific Country Using PHP?</h4>
<p><a href="http://designreviver.com/answers/18459/"><img src="http://designreviver.com/wp-content/uploads/2010/08/drphp_01.jpg" alt="How Do I Show Different Content to Visitors From a Specific Country Using PHP?" width="520"></a><br />
This question was originally asked by a <a href="http://designreviver.com/answers/member/3018">Devone</a>, and you will find the best answer below:</p>
<p>The Best Answer came from an <strong>Unregistered User</strong>:</p>
<p><a href="http://designreviver.com/answers/18459/"><img src="http://designreviver.com/wp-content/uploads/2010/08/drphp_02.jpg" alt="How Do I Show Different Content to Visitors From a Specific Country Using PHP?" width="520"></a></p>
<p>The Next Answer came from a <a href="http://designreviver.com/answers/member/30207">Pablo G</a></a>:</p>
<p><a href="http://designreviver.com/answers/18459/"><img src="http://designreviver.com/wp-content/uploads/2010/08/drphp_03.jpg" alt="How Do I Show Different Content to Visitors From a Specific Country Using PHP?" width="520"></a></p>
<h4>Unanswered Answers</h4>
<p>That is now five weeks without any unanswered questions!!!</p>
<p>Thanks to everyone who asked a question, but most importantly thanks to everyone that took the time and effort to offer helpful and useful answers.</p>
<img src="http://feeds.feedburner.com/~r/DesignReviver/~4/vBcYEMe1CTw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogmyquery.com/index.php/2010/08/using-php-show-different-content-to-visitors-from-a-specific-country/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Round-Up of Fresh jQuery Tutorials</title>
		<link>http://blogmyquery.com/index.php/2010/08/round-up-of-fresh-jquery-tutorials/</link>
		<comments>http://blogmyquery.com/index.php/2010/08/round-up-of-fresh-jquery-tutorials/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 09:58:14 +0000</pubDate>
		<dc:creator>speckyboy</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Feeds]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://designreviver.com/?p=8826</guid>
		<description><![CDATA[There really is no limit to what can be achieved with jQuery. And when it is in the right hands those limits are challenged all the time, constantly pushing back its seemingly endless boundaries by developing fresh and creative techniques. In this design news round-up we have collected our favorite recent jQuery tutorials.

Super Ajax Polling/Voting [...]]]></description>
			<content:encoded><![CDATA[<p>There really is no limit to what can be achieved with jQuery. And when it is in the right hands those limits are challenged all the time, constantly pushing back its seemingly endless boundaries by developing fresh and creative techniques. In this design news round-up we have collected our favorite recent jQuery tutorials.</p>
<p><span id="more-8826"></span></p>
<h4><a href="http://www.99points.info/2010/08/super-ajax-pollingvoting-system-using-jquery-ajax-php-and-mysql/">Super Ajax Polling/Voting System using JQuery, Ajax, PHP and MySQL</a></h4>
<p><a href="http://www.99points.info/2010/08/super-ajax-pollingvoting-system-using-jquery-ajax-php-and-mysql/"><img src="http://designreviver.com/wp-content/uploads/2010/08/dr_jquery_01.jpg" alt="Super Ajax Polling/Voting System using JQuery, Ajax, PHP and MySQL" width="520"></a></p>
<p><a href="http://www.99points.info/2010/08/super-ajax-pollingvoting-system-using-jquery-ajax-php-and-mysql/">Super Ajax Polling/Voting System using JQuery, Ajax, PHP and MySQL &rarr;</a></p>
<h4><a href="http://www.marcofolio.net/webdesign/jquery_quickie_slot_machine_navigation.html">jQuery Quickie: Slot Machine Style Navigation</a></h4>
<p><a href="http://www.marcofolio.net/webdesign/jquery_quickie_slot_machine_navigation.html"><img src="http://designreviver.com/wp-content/uploads/2010/08/dr_jquery_02.jpg" alt="jQuery Quickie: Slot Machine Style Navigation" width="520"></a></p>
<p><a href="http://www.marcofolio.net/webdesign/jquery_quickie_slot_machine_navigation.html">jQuery Quickie: Slot Machine Style Navigation &rarr;</a></p>
<h4><a href="http://www.divisionbyzero.co.uk/2010/08/04/how-to-create-a-great-contact-form-part-1/">How To Create A Great Contact Form</a></h4>
<p><a href="http://www.divisionbyzero.co.uk/2010/08/04/how-to-create-a-great-contact-form-part-1/"><img src="http://designreviver.com/wp-content/uploads/2010/08/dr_jquery_03.jpg" alt="How To Create A Great Contact Form" width="520"></a></p>
<p><a href="http://www.divisionbyzero.co.uk/2010/08/04/how-to-create-a-great-contact-form-part-1/">How To Create A Great Contact Form &rarr;</a></p>
<h4><a href="http://tympanus.net/codrops/2010/07/26/music-portfolio-template/">Music Portfolio Template with HTML5 and jQuery</a></h4>
<p><a href="http://tympanus.net/codrops/2010/07/26/music-portfolio-template/"><img src="http://designreviver.com/wp-content/uploads/2010/08/dr_jquery_04.jpg" alt="Music Portfolio Template with HTML5 and jQuery" width="520"></a></p>
<p><a href="http://tympanus.net/codrops/2010/07/26/music-portfolio-template/">Music Portfolio Template with HTML5 and jQuery &rarr;</a></p>
<h4><a href="http://tutorialzine.com/2010/08/simple-movie-search-app-jquery-ajax/">A Simple Movie Search App w/ jQuery UI</a></h4>
<p><a href="http://tutorialzine.com/2010/08/simple-movie-search-app-jquery-ajax/"><img src="http://designreviver.com/wp-content/uploads/2010/08/dr_jquery_05.jpg" alt="A Simple Movie Search App w/ jQuery UI" width="520"></a></p>
<p><a href="http://tutorialzine.com/2010/08/simple-movie-search-app-jquery-ajax/">A Simple Movie Search App w/ jQuery UI &rarr;</a></p>
<p>By Paul Andrew (<a href="http://speckyboy.com">Speckyboy</a>and <a href="http://twitter.com/speckyboy">speckyboy@twitter</a>).</p>
<img src="http://feeds.feedburner.com/~r/DesignReviver/~4/gSHpl1WmBuI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogmyquery.com/index.php/2010/08/round-up-of-fresh-jquery-tutorials/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Commonly Confused Bits Of jQuery</title>
		<link>http://blogmyquery.com/index.php/2010/08/commonly-confused-bits-of-jquery/</link>
		<comments>http://blogmyquery.com/index.php/2010/08/commonly-confused-bits-of-jquery/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 14:04:15 +0000</pubDate>
		<dc:creator>Andy Croxall</dc:creator>
				<category><![CDATA[Feeds]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[kranthi]]></category>

		<guid isPermaLink="false">http://www.smashingmagazine.com/?p=56112</guid>
		<description><![CDATA[<table width="650"><tr><td width="650"><div> <img src="http://creatives.commindo-media.de/static/smashing-magazine-advertisement.gif" alt="" border="0" /><img src="http://imp.constantcontact.com/imp/cmp.jsp?impcc=IMP_&#60;mprid/&#62;&#38;o=http://img.constantcontact.com/lp/images/standard/spacer.gif" alt="" border="0" width="1" height="1" /><br /> <a href="http://creatives.commindo-media.de/www/delivery/ck.php?zoneid=56" target="_blank"><img src="http://creatives.commindo-media.de/www/delivery/avw.php?zoneid=56" border="0" alt="" /></a>&#160;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=35" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=35" border="0" alt="" /></a>&#160;<a href="http://creatives.commindo-media.de/www/delivery/ck.php?zoneid=64" target="_blank"><img src="http://creatives.commindo-media.de/www/delivery/avw.php?zoneid=64" border="0" alt="" /></a></div></td></tr></table><p>The explosion of JavaScript libraries and frameworks such as <strong>jQuery</strong> onto the front-end development scene has opened up the power of JavaScript to a far wider audience than ever before. It was born of the need &#8212; expressed by a crescendo of screaming by front-end developers who were fast running out of hair to pull out &#8212; to improve JavaScript's somewhat primitive API, to make up for the lack of unified implementation across browsers and to make it more compact in its syntax.</p><p><a href="http://www.smashingmagazine.com/2010/08/04/commonly-confused-bits-of-jquery/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/08/jquery.png" width="474" height="242" alt="Screenshot" /></a></p> <p>All of which means that, unless you have some odd grudge against jQuery, those days are gone &#8212; you can actually get stuff done now. A script to find all links of a certain CSS class in a document and bind an event to them now requires one line of code, not 10. To power this, jQuery brings to the party its own API, featuring a host of functions, methods and syntactical peculiarities. Some are confused or appear similar to each other but actually differ in some way. <strong>This article clears up some of these confusions</strong>.</p><p>You may be interested in the following related posts:</p><ul><li><a href="http://www.smashingmagazine.com/2010/04/20/seven-javascript-things-i-wish-i-knew-much-earlier-in-my-career/">Seven JavaScript Things I Wish I Knew Much Earlier In My Career</a></li><li><a href="http://www.smashingmagazine.com/2010/02/22/the-seven-deadly-sins-of-javascript-implementation/">The Seven Deadly Sins Of JavaScript Implementation</a></li><li><a href="http://www.smashingmagazine.com/2010/02/10/some-things-you-should-know-about-ajax/">Developing Sites With AJAX: Design Challenges and Common Issues</a></li></ul>]]></description>
			<content:encoded><![CDATA[<table width="650"><tr><td width="650"><div style="width:650px;"> <img src="http://creatives.commindo-media.de/static/smashing-magazine-advertisement.gif" alt="Smashing-magazine-advertisement in Commonly Confused Bits Of jQuery" border="0" /><img src="http://imp.constantcontact.com/imp/cmp.jsp?impcc=IMP_&#60;mprid/&#62;&#038;o=http://img.constantcontact.com/lp/images/standard/spacer.gif" alt="Spacer in Commonly Confused Bits Of jQuery" border="0" width="1" height="1" /><br /> <a href="http://creatives.commindo-media.de/www/delivery/ck.php?zoneid=56" ><img src="http://creatives.commindo-media.de/www/delivery/avw.php?zoneid=56" border="0" alt=" in Commonly Confused Bits Of jQuery"  /></a>&nbsp;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=35" ><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=35" border="0" alt=" in Commonly Confused Bits Of jQuery"  /></a>&nbsp;<a href="http://creatives.commindo-media.de/www/delivery/ck.php?zoneid=64" ><img src="http://creatives.commindo-media.de/www/delivery/avw.php?zoneid=64" border="0" alt=" in Commonly Confused Bits Of jQuery"  /></a></div></td></tr></table><p>The explosion of JavaScript libraries and frameworks such as <strong>jQuery</strong> onto the front-end development scene has opened up the power of JavaScript to a far wider audience than ever before. It was born of the need &mdash; expressed by a crescendo of screaming by front-end developers who were fast running out of hair to pull out &mdash; to improve JavaScript&#8217;s somewhat primitive API, to make up for the lack of unified implementation across browsers and to make it more compact in its syntax.</p><p>All of which means that, unless you have some odd grudge against jQuery, those days are gone &mdash; you can actually get stuff done now. A script to find all links of a certain CSS class in a document and bind an event to them now requires one line of code, not 10. To power this, jQuery brings to the party its own API, featuring a host of functions, methods and syntactical peculiarities. Some are confused or appear similar to each other but actually differ in some way. <strong>This article clears up some of these confusions</strong>.</p><p class="offtopic">[Offtopic: by the way, did you already get your copy of the <a href="http://creatives.commindo-media.de/www/delivery/ck.php?oaparams=2__bannerid=1368__zoneid=0__cb=b06a9d8418__oadest=http%3A%2F%2Fshop.smashingmagazine.com%2Fsmashingbook-dispatcher.php%3Fd%3Dsmashing-book%26utm_source%3DSmashing%252BMagazine%26utm_medium%3Deditorialbox2%26utm_content%3DBTW-Werbesatz%252Bmit%2520Shop%2520als%2520Ziel%26utm_campaign%3DSmashing%252BMagazine%2520-%2520BTW%2520Editorial%2520Box%2520-%2520Shttp://creatives.commindo-media.de/www/delivery/ck.php?oaparams=2__bannerid=1368__zoneid=0__log=no__cb=b06a9d8418__oadest=http%3A%2F%2Fshop.smashingmagazine.com%2Fsmashingbook-dispatcher.php%3Fd%3Dsmashing-book%26utm_source%3DSmashing%252BMagazine%26utm_medium%3Deditorialbox2%26utm_content%3DBTW-Werbesatz%252Bmit%2520Shop%2520als%2520Ziel%26utm_campaign%3DSmashing%252BMagazine%2520-%2520BTW%2520Editorial%2520Box%2520-%2520Smashing%2520Bookmashing%2520Book">Smashing Book</a>?]</p><h3>1. .parent() vs. .parents() vs. .closest()</h3><p>All three of these methods are concerned with navigating upwards through the DOM, above the element(s) returned by the selector, and matching certain parents or, beyond them, ancestors. But they differ from each other in ways that make them each uniquely useful.</p><h4>parent(selector)</h4><p>This simply matches the <strong>one immediate parent</strong> of the element(s). It can take a selector, which can be useful for matching the parent only in certain situations. For example:</p><pre class="brush: js">
$('span#mySpan').parent().css('background', '#f90');
$('p').parent('div.large').css('background', '#f90');
</pre><p>The first line gives the parent of <code>#mySpan</code>. The second does the same for parents of all <code>&#60;p&#62;</code> tags, provided that the parent is a <code>div</code> and has the class <code>large</code>.</p><p><em>Tip:</em> the ability to limit the reach of methods like the one in the second line is a common feature of jQuery. The majority of DOM manipulation methods allow you to specify a selector in this way, so it&#8217;s not unique to <code>parent()</code>.</p><h4>parents(selector)</h4><p>This acts in much the same way as <code>parent()</code>, except that it is not restricted to just one level above the matched element(s). That is, it can return <strong>multiple ancestors</strong>. So, for example:</p><pre class="brush: js">
$('li.nav').parents('li'); //for each LI that has the class nav, go find all its parents/ancestors that are also LIs
</pre><p>This says that for each <code>&#60;li&#62;</code> that has the class <code>nav</code>, return all its parents/ancestors that are also <code>&#60;li&#62;</code>s. This could be useful in a multi-level navigation tree, like the following:</p><pre class="brush: html">
&#60;ul id='nav'&#62;
	&#60;li&#62;Link 1
		&#60;ul&#62;
			&#60;li&#62;Sub link 1.1&#60;/li&#62;
			&#60;li&#62;Sub link 1.2&#60;/li&#62;
			&#60;li&#62;Sub link 1.3&#60;/li&#62;
		&#60;/ul&#62;
	&#60;li&#62;Link 2
		&#60;ul&#62;
			&#60;li&#62;Sub link 2.1</li>

			&#60;li&#62;Sub link 2.2</li>

		&#60;/ul&#62;
	&#60;/li&#62;
&#60;/ul&#62;
</pre><p>Imagine we wanted to color every third-generation <code>&#60;li&#62;</code> in that tree orange. Simple:</p><pre class="brush: js">
$('#nav li').each(function() {
	if ($(this).parents('#nav li').length == 2)
		$(this).css('color', '#f90');
});</pre><p>This translates like so: for every <code>&#60;li&#62;</code> found in <code>#nav</code> (hence our <code>each()</code> loop), whether it&#8217;s a direct child or not, see how many <code>&#60;li&#62;</code> parents/ancestors are above it within <code>#nav</code>. If the number is two, then this <code>&#60;li&#62;</code> must be on level three, in which case color.</p><h4>closest(selector)</h4><p>This is a bit of a well-kept secret, but very useful. It works like <code>parents()</code>, except that it returns <strong>only one parent/ancestor</strong>. In my experience, you&#8217;ll normally want to check for the existence of one particular element in an element&#8217;s ancestry, not a whole bunch of them, so I tend to use this more than <code>parent()</code>. Say we wanted to know whether an element was a descendent of another, however deep in the family tree:</p><pre class="brush: js">
if ($('#element1').closest('#element2').length == 1)
	alert("yes - #element1 is a descendent of #element2!");
else
	alert("No - #element1 is not a descendent of #element2");
</pre><p><em>Tip:</em> you can simulate <code>closest()</code> by using <code>parents()</code> and limiting it to one returned element.</p><pre class="brush: js">
$($('#element1').parents('#element2').get(0)).css('background', '#f90');
</pre><p>One quirk about <code>closest()</code> is that traversal starts from the element(s) matched by the selector, not from its parent. This means that if the selector that passed inside <code>closest()</code> matches the element(s) it is running on, it will return itself. For example:</p><pre class="brush: js">
$('div#div2').closest('div').css('background', '#f90');
</pre><p>This will turn <code>#div2</code> itself orange, because <code>closest()</code> is looking for a <code>&#60;div&#62;</code>, and the nearest <code>&#60;div&#62;</code> to <code>#div2</code> is itself.</p><h3>2. .position() vs. .offset()</h3><p>These two are both concerned with reading the position of an element &mdash; namely the first element returned by the selector. They both return an object containing two properties, left and top, but they differ in <strong>what the returned position is relative to</strong>.</p><p><code>position()</code> calculates positioning relative to the offset parent &mdash; or, in more understandable terms, the nearest parent or ancestor of this element that has <code>position: relative</code>. If no such parent or ancestor is found, the position is calculated relative to the document (i.e. the top-left corner of the viewport).</p><p><code>offset()</code>, in contrast, always calculates positioning relative to the document, regardless of the <code>position</code> attribute of the element&#8217;s parents and ancestors.</p><p>Consider the following two <code>&#60;div&#62;</code>s:</p><div id='wrapperDiv' style='position: relative; left: 100px; width: 300px; height: 190px; background: #f90; margin: 10px; padding: 10px;'><p>Hello &#8211; I&#8217;m outerDiv. I have position: relative and left: 100px</p><div id='innerDiv' style='position: absolute; left: 50px; top: 80px; width: 150px; height: 100px; background: #f00; padding: 10px;'><p style='color: #fff'>Hi &#8211; I&#8217;m #innerDiv. I have position absolute, left: 50px and top: 80px.</p></p></div></div><p>Querying (no pun intended) the <code>offset()</code> and <code>position()</code> of <code>#innerDiv</code> will return different results.</p><pre class="brush: js">
var position = $('#innerDiv').position();
var offset = $('#innerDiv').offset();
alert("Position: left = "+position.left+", top = "+position.top+"\n"+
      "Offset: left = "+offset.left+" and top = "+offset.top
)
</pre><p></p><p>Try it yourself to see the results: <a href='javascript:getPositionAndOffset()'>click here</a>.</p><h3>3. .css(&#8216;width&#8217;) and .css(&#8216;height&#8217;) vs. .width() and .height()</h3><p>These three, you won&#8217;t be shocked to learn, are concerned with calculating the dimensions of an element in pixels. They both return the offset dimensions, which are the genuine dimensions of the element no matter how stretched it is by its inner content.</p><p><strong>They differ in the data types they return</strong>: <code>css('width')</code> and <code>css('height')</code> return dimensions as strings, with <code>px</code> appended to the end, while <code>width()</code> and <code>height()</code> return dimensions as integers.</p><p>There&#8217;s actually another little-known difference that concerns IE (quelle surprise!), and it&#8217;s why you should avoid the <code>css('width')</code> and <code>css('height')</code> route. It has to do with the fact that IE, when asked to read â€œcomputedâ€� (i.e. not implicitly set) dimensions, unhelpfully returns <code>auto</code>. In jQuery core, <code>width()</code> and <code>height()</code> are based on the <code>.offsetWidth</code> and <code>.offsetHeight</code> properties resident in every element, which IE <em>does</em> read correctly.</p><p>But if you&#8217;re working on elements with dimensions implicitly set, you don&#8217;t need to worry about that. So, if you wanted to read the width of one element and set it on another element, you&#8217;d opt for <code>css('width')</code>, because setting dimensions, just like in CSS, requires specifying a unit of measurement.</p><p>But if you wanted to read an element&#8217;s <code>width()</code> with a view to performing a calculation on it, you&#8217;d be interested only in the figure; hence <code>width()</code> is better.</p><p>Note that <strong>each of these can simulate the other</strong> with the help of an extra line of JavaScript, like so:</p><pre class="brush: js">
var width = $('#someElement').width(); //returns integer
width = width+'px'; //now it's a string like css('width') returns
var width = $('#someElement').css('width'); //returns string
width = parseInt(width); //now it's an integer like width() returns
</pre><p>Lastly, <code>width()</code> and <code>height()</code> actually have another trick up their sleeves: they can return <strong>the dimensions of the window and document</strong>. If you try this using the <code>css()</code> method, you&#8217;ll get an error.</p><h3>4. .click() (etc) vs. .bind() vs. .live() vs. .delegate</h3><p>These are all concerned with binding events to elements. The differences lie in what elements they bind to and how much we can influence the event handler (or â€œcallbackâ€�). If this sounds confusing, don&#8217;t worry. I&#8217;ll explain.</p><h4>click() (etc)</h4><p>It&#8217;s important to understand that <code>bind()</code> is the daddy of jQuery&#8217;s event-handling API. Most tutorials deal with events with simple-looking methods, such as <code>click()</code> and <code>mouseover()</code>, but behind the scenes these are just the lieutenants who report back to <code>bind()</code>.</p><p>These lieutenants, or aliases, give you quick access to bind certain event types to the elements returned by the selector. They all take one argument: a callback function to be executed when the event fires. For example:</p><pre class="brush: js">
$('#table td ').click(function() {
	alert("The TD you clicked contains '"+$(this).text()+"'");
});
</pre><p>This simply says that whenever a <code>&#60;div&#62;</code> inside <code>#table</code> is clicked, alert its text content.</p><h4>bind()</h4><p>We can do the same thing with <code>bind</code>, like so:</p><pre class="brush: js">
$('#table td ').bind('click', function() {
	alert("The TD you clicked contains '"+$(this).text()+"'");
});
</pre><p>Note that this time, the event type is passed as the first argument to <code>bind()</code>, with the callback as the second argument. Why would you use <code>bind()</code> over the simpler alias functions?</p><p>Very often you wouldn&#8217;t. But <code>bind()</code> gives you more control over what happens in the event handler. It also allows you to bind more than one event at a time, by space-separating them as the first argument, like so:</p><pre class="brush: js">
$('#table td').bind('click contextmenu', function() {
	alert("The TD you clicked contains '"+$(this).text()+"'");
});
</pre><p>Now, our event fires whether we&#8217;ve clicked the <code>&#60;td&#62;</code> with the left or right button. I also mentioned that <code>bind()</code> gives you more control over the event handler. How does that work? It does it by passing three arguments rather than two, with argument two being a data object containing properties readable to the callback, like so:</p><pre class="brush: js">
$('#table td').bind('click contextmenu', {message: 'hello!'}, function(e) {
	alert(e.data.message);
});
</pre><p>As you can see, we&#8217;re passing into our callback a set of variables for it to have access to, in our case the variable <code>message</code>.</p><p>You might wonder why we would do this. Why not just specify any variables we want outside the callback and have our callback read those? The answer has to do with <strong>scope and closures</strong>. When asked to read a variable, JavaScript starts in the immediate scope and works outwards (this is a fundamentally different behavior to languages such as PHP). Consider the following:</p><pre class="brush: js">
var message = 'you left clicked a TD';
$('#table td').bind('click', function(e) {
	alert(message);
});
var message = 'you right clicked a TD';
$('#table td').bind('contextmenu', function(e) {
	alert(message);
});
</pre><p>No matter whether we click the <code>&#60;td&#62;</code> with the left or right mouse button, we will be told it was the right one. This is because the variable <code>message</code> is read by the <code>alert()</code> at the time of the event firing, not at the time the event was bound.</p><p>If we give each event its <em>own</em> â€œversionâ€� of <code>message</code> at the time of binding the events, we solve this problem.</p><pre class="brush: js">
$('#table td').bind('click', {message: 'You left clicked a TD'}, function(e) {
	alert(e.data.message);
});
$('#table td').bind('contextmenu', {message: 'You right clicked a TD'}, function(e) {
	alert(e.data.message);
});
</pre><p>Events bound with <code>bind()</code> and with the alias methods (<code>.mouseover()</code>, etc) are unbound with the <code>unbind()</code> method.</p><h4>live()</h4><p>This works almost exactly the same as <code>bind()</code> but with one crucial difference: events are bound both to current and future elements &mdash; that is, any elements that do not currently exist but which may be DOM-scripted after the document is loaded.</p><p><strong>Side note:</strong> DOM-scripting entails creating and manipulating elements in JavaScript. Ever notice in your Facebook profile that when you â€œadd another employerâ€� a field magically appears? That&#8217;s DOM-scripting, and while I won&#8217;t get into it here, it looks broadly like this:</p><pre class="brush: js">
var newDiv = document.createElement('div');
newDiv.appendChild(document.createTextNode('hello, world!'));
$(newDiv).css({width: 100, height: 100, background: '#f90'});
document.body.appendChild(newDiv);
</pre><h4>delegate()</h4><p>Another shortfall of <code>live()</code> is that, unlike the vast majority of jQuery methods, <strong>it cannot be used in chaining</strong>. That is, it must be used directly on a selector, like so:</p><pre class="brush: js">
$('#myDiv a').live('mouseover', function() {
	alert('hello');
});
</pre><p>But notâ€¦</p><pre class="brush: js">
$('#myDiv').children('a').live('mouseover', function() {
	alert('hello');
});
</pre><p>â€¦ which will fail, as it will if you pass direct DOM elements, such as <code>$(document.body)</code>.</p><p><code>delegate()</code>, which was developed as part of jQuery 1.4.2, goes some way to solving this problem by accepting as its first argument a context within the selector. For example:</p><pre class="brush: js">
$('#myDiv').delegate('a', 'mouseover', function() {
	alert('hello');
});
</pre><p>Like <code>live()</code>, <code>delegate()</code> binds events both to current and future elements. Handlers are unbound via the <code>undelegate()</code> method.</p><h4>Real-Life Example</h4><p>For a real-life example, I want to stick with DOM-scripting, because this is an important part of any RIA (rich Internet application) built in JavaScript.</p><p>Let&#8217;s imagine a flight-booking application. The user is asked to supply the names of all passengers travelling. Entered passengers appear as new rows in a table, <code>#passengersTable</code>, with two columns: â€œNameâ€� (containing a text field for the passenger) and â€œDeleteâ€� (containing a button to remove the passenger&#8217;s row).</p><p>To add a new passenger (i.e. row), the user clicks a button, <code>#addPassenger</code>:</p><pre class="brush: js">
$('#addPassenger').click(function() {
	var tr = document.createElement('tr');
	var td1 = document.createElement('td');
	var input = document.createElement('input');
	input.type = 'text';
	$(td1).append(input);
	var td2 = document.createElement('td');
	var button = document.createElement('button');
	button.type = 'button';
	$(button).text('delete');
	$(td2).append(button);
	$(tr).append(td1);
	$(tr).append(td2);
	$('#passengersTable tbody').append(tr);
});
</pre><p>Notice that the event is applied to <code>#addPassenger</code> with <code>click()</code>, not <code>live('click')</code>, because we know <strong>this button will exist from the beginning</strong>.</p><p>What about the event code for the â€œDeleteâ€� buttons to delete a passenger?</p><pre class="brush: js">
$('#passengersTable td button').live('click', function() {
	if (confirm("Are you sure you want to delete this passenger?"))
	$(this).closest('tr').remove();
});
</pre><p>Here, we apply the event with <code>live()</code> because the element to which it is being bound (i.e. the button) did not exist at runtime; it was DOM-scripted later in the code to add a passenger.</p><p>Handlers bound with <code>live()</code> are unbound with the <code>die()</code> method.</p><p>The convenience of <code>live()</code> comes at a price: one of its drawbacks is that you cannot pass an object of multiple event handlers to it. Only one handler.</p><h3>5. .children() vs. .find()</h3><p>Remember how the differences between <code>parent()</code>, <code>parents()</code> and <code>closest()</code> really boiled down to a question of reach? So it is here.</p><h4>children()</h4><p>This returns the immediate children of an element or elements returned by a selector. As with most jQuery DOM-traversal methods, it is optionally filtered with a selector. So, if we wanted to turn all <code>&#60;td&#62;</code>s in a table that contained the word â€œdogâ€� orange, we could use this:</p><pre class="brush: js">
$('#table tr').children('td:contains(dog)').css('background', '#f90');
</pre><h4>find()</h4><p>This works very similar to <code>children()</code>, only it looks at both children and more distant descendants. It is also often a safer bet than <code>children()</code>.</p><p>Say it&#8217;s your last day on a project. You need to write some code to hide all <code>&#60;tr&#62;</code>s that have the class <code>hideMe</code>. But some developers omit <code>&#60;tbody&#62;</code> from their table mark-up, so we need to cover all bases for the future. It would be risky to target the <code>&#60;tr&#62;</code>s like thisâ€¦</p><pre class="brush: js">
$('#table tbody tr.hideMe').hide();
</pre><p>â€¦ because that would fail if there&#8217;s no <code>&#60;tbody&#62;</code>. Instead, we use <code>find()</code>:</p><pre class="brush: js">
$('#table').find('tr.hideMe').hide();
</pre><p>This says that wherever you find a <code>&#60;tr&#62;</code> in <code>#table</code> with <code>.hideMe</code>, of whatever descendancy, hide it.</p><h3>6. .not() vs. !.is() vs. :not()</h3><p>As you&#8217;d expect from functions named â€œnotâ€� and â€œis,â€� these are opposites. But there&#8217;s more to it than that, and these two are <strong>not really equivalents</strong>.</p><h4>.not()</h4><p><code>not()</code> returns elements that do not match its selector. For example:</p><pre class="brush: js">
$('p').not('.someclass').css('color', '#f90');
</pre><p>That turns all paragraphs that do <em>not</em> have the class <code>someclass</code> orange.</p><h4>.is()</h4><p>If, on the other hand, you want to target paragraphs that <em>do</em> have the class <code>someclass</code>, you could be forgiven for thinking that this would do it:</p><pre class="brush: js">
$('p').is('.someclass').css('color', '#f90');
</pre><p>In fact, this would cause an error, because <strong><code>is()</code> does not return elements: it returns a boolean</strong>. It&#8217;s a testing function to see whether any of the chain elements match the selector.</p><p>So when is <code>is</code> useful? Well, it&#8217;s useful for querying elements about their properties. See the real-life example below.</p><h4>:not()</h4><p><code>:not()</code> is the pseudo-selector equivalent of the method <code>.not()</code> It performs the same job; the only difference, as with all pseudo-selectors, is that you can use it in the middle of a selector string, and jQuery&#8217;s string parser will pick it up and act on it. The following example is equivalent to our <code>.not()</code> example above:</p><pre class="brush: js">
$('p:not(.someclass)').css('color', '#f90');
</pre><h4>Real-Life Example</h4><p>As we&#8217;ve seen, <code>.is()</code> is used to test, not filter, elements. Imagine we had the following sign-up form. Required fields have the class <code>required</code>.</p><pre class="brush: html">
&#60;form id='myform' method='post' action='somewhere.htm'&#62;
	&#60;label&#62;Forename *</label>
	&#60;input type='text' class='required' /&#62;
	&#60;br /&#62;
	&#60;label&#62;Surname *</label>
	&#60;input type='text' class='required' /&#62;
	&#60;br /&#62;
	&#60;label&#62;Phone number</label>
	&#60;input type='text' /&#62;
	&#60;br /&#62;
	&#60;label&#62;Desired username *</label>
	&#60;input type='text' class='required' /&#62;
	&#60;br /&#62;
	&#60;input type='submit' value='GO' /&#62;
&#60;/form&#62;
</pre><p>When submitted, our script should check that no required fields were left blank. If they were, the user should be notified and the submission halted.</p><pre class="brush: js">
$('#myform').submit(function() {
	if ($(this).find('input').is('.required[value=]')) {
		alert('Required fields were left blank! Please correct.');
		return false; //cancel submit event
	}
});
</pre><p>Here we&#8217;re not interested in returning elements to manipulate them, but rather just in querying their existence. Our <code>is()</code> part of the chain merely checks for the existence of fields within <code>#myform</code> that match its selector. It returns true if it finds any, which means required fields were left blank.</p><h3>7. .filter() vs. .each()</h3><p>These two are concerned with iteratively visiting each element returned by a selector and doing something to it.</p><h4>.each()</h4><p><code>each()</code> loops over the elements, but it can be used in two ways. The first and most common involves passing a callback function as its only argument, which is also used to act on each element in succession. For example:</p><pre class="brush: js">
$('p').each(function() {
	alert($(this).text());
});
</pre><p>This visits every <code>&#60;p&#62;</code> in our document and alerts out its contents.</p><p>But <code>each()</code> is more than just a method for running on selectors: it can also be used to handle <strong>arrays and array-like objects</strong>. If you know PHP, think <code>foreach()</code>. It can do this either as a method or as a core function of jQuery. For exampleâ€¦</p><pre class="brush: js">
var myarray = ['one', 'two'];
$.each(myarray, function(key, val) {
	alert('The value at key '+key+' is '+val);
});
</pre><p>â€¦ is the same as:</p><pre class="brush: js">
var myarray = ['one', 'two'];
$(myarray).each(function(key, val) {
	alert('The value at key '+key+' is '+val);
});
</pre><p>That is, for each element in <code>myarray</code>, in our callback function its key and value will be available to read via the <code>key</code> and <code>val</code> variables, respectively.</p><p>One of the great things about this is that you can also iterate over objects &mdash; but only in the first way (i.e. <code>$.each</code>).</p><p>jQuery is known as a DOM-manipulation and effects framework, quite different in focus from other frameworks such as MooTools, but <code>each()</code> is an example of its occasional foray into extending JavaScript&#8217;s native API.</p><h4>.filter()</h4><p><code>filter()</code>, like <code>each()</code>, visits each element in the chain, but this time to remove it from the chain if it doesn&#8217;t pass a certain test.</p><p>The most common application of <code>filter()</code> is to pass it a selector string, just like you would specify at the start of a chain. So, the following are equivalents:</p><pre class="brush: js">
$('p.someClass').css('color', '#f90');
$('p').filter('.someclass').css('color', '#f90');
</pre><p>In which case, why would you use the second example? The answer is, sometimes you want to affect element sets that you cannot (or don&#8217;t want to) change. For example:</p><pre class="brush: js">
var elements = $('#someElement div ul li a');
//hundreds of lines later...
elements.filter('.someclass').css('color', '#f90');
</pre><p><code>elements</code> was set long ago, so we cannot &mdash; indeed may not wish to &mdash; change the elements that return, but we might later want to filter them.</p><p><code>filter()</code> really comes into its own, though, when you pass it a filter function to which each element in the chain in turn is passed. Whether the function returns true or false determines whether the element stays in the chain. For example:</p><pre class="brush: js">
$('p').filter(function() {
	return $(this).text().indexOf('hello') != -1;
}).css('color', '#f90')
</pre><p>Here, for each <code>&#60;p&#62;</code> found in the document, if it contains the string <code>hello</code>, turn it orange. Otherwise, don&#8217;t affect it.</p><p>We saw above how <code>is()</code>, despite its name, was not the equivalent of <code>not()</code>, as you might expect. Rather, <strong>use <code>filter()</code> as the positive equivalent of <code>not()</code>.</strong></p><p>Note also that unlike <code>each()</code>, <code>filter()</code> cannot be used on arrays and objects.</p><h4>Real-Life Example</h4><p>You might be looking at the example above, where we turned <code>&#60;p&#62;</code>s starting with <code>hello</code> orange, and thinking, &#8220;But we could do that more simply.&#8221; You&#8217;d be right:</p><pre class="brush: js">
$('p:contains(hello)').css('color', '#f90')
</pre><p>For such a simple condition (i.e. contains <code>hello</code>), that&#8217;s fine. But <strong><code>filter()</code> is all about letting us perform more complex or long-winded evaluations</strong> before deciding whether an element can stay in our chain.</p><p>Imagine we had a table of CD products with four columns: artist, title, genre and price. Using some controls at the top of the page, the user stipulates that they do not want to see products for which the genre is â€œCountryâ€� or the price is above $10. These are two filter conditions, so we need a filter function:</p><pre class="brush: js">
$('#productsTable tbody tr').filter(function() {
	var genre = $(this).children('td:nth-child(3)').text();
	var price = $(this).children('td:last').text().replace(/[^\d\.]+/g, '');
	return genre.toLowerCase() == 'country' || parseInt(price) >= 10;
}).hide();
</pre><p>So, for each <code>&#60;tr&#62;</code> inside the table, we evaluate columns 3 and 4 (genre and price), respectively. We know the table has four columns, so we can target column 4 with the <code>:last</code> pseudo-selector. For each product looked at, we assign the genre and price to their own variables, just to keep things tidy.</p><p>For the price, we replace any characters that might prevent us from using the value for mathematical calculation. If the column contained the value <code>$14.99</code> and we tried to compute that by seeing whether it matched our condition of being below $10, we would be told that it&#8217;s not a number, because it contains the $ sign. Hence we strip away everything that is not number or dot.</p><p>Lastly, we return true (<strong>meaning the row will be hidden</strong>) if either of our conditions are met (i.e. the genre is country or the price is $10 or more).</p><p><code>filter()</code></p><h3>8. .merge() vs. .extend()</h3><p>Let&#8217;s finish with a foray into more advanced JavaScript and jQuery. We&#8217;ve looked at positioning, DOM manipulation and other common issues, but jQuery also provides some utilities for dealing with the native parts of JavaScript. This is not its main focus, mind you; libraries such as MooTools exist for this purpose.</p><h4>.merge()</h4><p><code>merge()</code> allows you to merge the contents of two arrays into the first array. This entails <strong>permanent change for the first array</strong>. It does not make a new array; values from the second array are appended to the first:</p><pre class="brush: js">
var arr1 = ['one', 'two'];
var arr2 = ['three', 'four'];
$.merge(arr1, arr2);
</pre><p>After this code runs, the <code>arr1</code> will contain four elements, namely <code>one</code>, <code>two</code>, <code>three</code>, <code>four</code>. <code>arr2</code> is unchanged. (If you&#8217;re familiar with PHP, this function is equivalent to <code>array_merge()</code>.)</p><h4>.extend()</h4><p><code>extend()</code> does a similar thing, but for objects:</p><pre class="brush: js">
var obj1 = {one: 'un', two: 'deux'}
var obj2 = {three: 'trois', four: 'quatre'}
$.extend(obj1, obj2);
</pre><p><code>extend()</code> has a little more power to it. For one thing, you can merge more than two objects &mdash; you can pass as many as you like. For another, it can merge recursively. That is, if properties of objects are themselves objects, you can ensure that they are merged, too. To do this, pass <code>true</code> as the first argument:</p><pre class="brush: js">
var obj1 = {one: 'un', two: 'deux'}
var obj2 = {three: 'trois', four: 'quatre'}
$.extend(true, obj1, obj2);
</pre><p>Covering everything about the behaviour of JavaScript objects (and how merge interacts with them) is beyond the scope of this article, but you can <a href="http://api.jquery.com/jQuery.extend/">read more here</a>.</p><p>The difference between <code>merge()</code> and <code>extend()</code> in jQuery is <strong>not the same as it is in MooTools</strong>. One is used to amend an existing object, the other creates a new copy.</p><h3>There You Have It</h3><p>We&#8217;ve seen some similarities, but more often than not intricate (and occasionally major) differences. jQuery is not a language, but it deserves to be learned as one, and by learning it you will make better decisions about what methods to use in what situation.</p><p>While there are strict rules these days for writing semantic and SEO-compliant mark-up, JavaScript is still very much the playground of the developer. No one will demand that you use <code>click()</code> instead of <code>bind()</code>, but that&#8217;s not to say one isn&#8217;t a better choice than the other. It&#8217;s all about the situation.</p><h3>Related Posts</h3><p>You may be interested in the following related posts:</p><ul><li><a href="http://www.smashingmagazine.com/2010/04/20/seven-javascript-things-i-wish-i-knew-much-earlier-in-my-career/">Seven JavaScript Things I Wish I Knew Much Earlier In My Career</a></li><li><a href="http://www.smashingmagazine.com/2010/02/22/the-seven-deadly-sins-of-javascript-implementation/">The Seven Deadly Sins Of JavaScript Implementation</a></li><li><a href="http://www.smashingmagazine.com/2010/02/10/some-things-you-should-know-about-ajax/">Developing Sites With AJAX: Design Challenges and Common Issues</a></li></ul><p><em>We appreciate the feedback of our Twitter followers who reviewed the article before it was published.</em></p><p><em>(al)</em></p><hr /><p><small>Â© Andy Croxall for <a href="http://www.smashingmagazine.com">Smashing Magazine</a>, 2010. | <a href="http://www.smashingmagazine.com/2010/08/04/commonly-confused-bits-of-jquery/">Permalink</a> | <a href="http://www.smashingmagazine.com/2010/08/04/commonly-confused-bits-of-jquery/#comments">Post a comment</a> | <a title="Bookmark in del.icio.us" href="http://del.icio.us/post?url=http://www.smashingmagazine.com/2010/08/04/commonly-confused-bits-of-jquery/&title=Commonly Confused Bits Of jQuery">Add to del.icio.us</a> | <a title="Bookmark in Digg" href="http://digg.com/submit?phase=2&url=http://www.smashingmagazine.com/2010/08/04/commonly-confused-bits-of-jquery/">Digg this</a> | <a title="Stumble on StumbleUpon" href="http://www.stumbleupon.com/submit?url=http://www.smashingmagazine.com/2010/08/04/commonly-confused-bits-of-jquery/">Stumble on StumbleUpon!</a> | <a title="Tweet us!" href="http://twitter.com/home?status=@tweetmeme%20@smashingmag%20Reading%20'Commonly Confused Bits Of jQuery' http://www.smashingmagazine.com/2010/08/04/commonly-confused-bits-of-jquery/">Tweet it!</a> | <a title="Bookmark in Reddit" href="http://reddit.com/submit?url=http://www.smashingmagazine.com/2010/08/04/commonly-confused-bits-of-jquery/">Submit to Reddit</a> | <a href="http://forum.smashingmagazine.com/">Forum Smashing Magazine</a><br/> Post tags: <a href="http://www.smashingmagazine.com/tag/coding/" rel="tag">Coding</a>, <a href="http://www.smashingmagazine.com/tag/javascript/" rel="tag">javascript</a>, <a href="http://www.smashingmagazine.com/tag/jquery/" rel="tag">jquery</a>, <a href="http://www.smashingmagazine.com/tag/programming/" rel="tag">programming</a><br/> </small></p>]]></content:encoded>
			<wfw:commentRss>http://blogmyquery.com/index.php/2010/08/commonly-confused-bits-of-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Troubles When Developing With AJAX</title>
		<link>http://blogmyquery.com/index.php/2010/07/troubles-when-developing-with-ajax/</link>
		<comments>http://blogmyquery.com/index.php/2010/07/troubles-when-developing-with-ajax/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 14:35:46 +0000</pubDate>
		<dc:creator>John Urban</dc:creator>
				<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[Feeds]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://designreviver.com/?p=8001</guid>
		<description><![CDATA[For those that are not familiar with AJAX,Â the word is an acronym for Asynchronous JavaScript + XML. AJAX is not new to the scene. In fact, even the newest advances in AJAX are at least five years old. Yet AJAX is becoming the buzz word in developing. AJAX is a very powerful technology that allows [...]]]></description>
			<content:encoded><![CDATA[<p>For those that are not familiar with AJAX,Â the word is an acronym for Asynchronous JavaScript + XML. AJAX is not new to the scene. In fact, even the newest advances in AJAX are at least five years old. Yet AJAX is becoming the buzz word in developing. AJAX is a very powerful technology that allows you to build a website with incredible functionality without users having to refresh the web page they are on. However, there are some â€œbumpsâ€� in the road when trying to utilize AJAX.<span id="more-8001"></span></p>
<p><a href="http://designreviver.com/wp-content/uploads/2010/07/0947f468376b401db703906a6d8b4877_ASP_Ajax.gif"><img class="alignnone size-full wp-image-8002" src="http://designreviver.com/wp-content/uploads/2010/07/0947f468376b401db703906a6d8b4877_ASP_Ajax.gif" alt="" width="354" height="296" /></a></p>
<p>What does AJAX do? Basically, it makes it possible for a group of techniques to have interactive web applications to use Javascript to process XML/XHTML, with CSS, in a browser without having to reload the entire web. In other words, AJAX allows the browser and web server to synchronize the exchange of data, making the interaction and reloading of each web page faster.</p>
<p>One of the problems with Ajax is that its updates often contain information retrieved from a script running on the server side. It is very common for a browser to not display any kind of visual indication that any portion of AJAX is loading. The developer canâ€™t see this interaction first hand, so it&#8217;s difficult to see exactly where to go in the application to be able to determine whether the client-side JavaScript is correctly communicating with theÂ server or not. A solution for this is why itâ€™s imperative to insert a visual indicator that will allow you to know something is occurring. You can use a visual swirl very similar to the ones used when a light box image is loading.</p>
<p>Another solution is to use Firebug to monitor HTTP communications. Letâ€™s say that the page did not load as expected, or didnâ€™t render precisely. By using the Firebug feature youâ€™ll be able to determine if the HTTP communications flow is processing properly as the page loads, followed by including the jQuery library and the correct interaction of the server-side-script with the inclusion of the JavaScript mechanism. By using Firebug you will be able to see if the HTTP payloads between the client and server are communicating properly.</p>
<p>Another problem with AJAX is the problem of getting the â€œBack Buttonâ€� on the browser to work properly in the JavaScript application. Developers asking for problems in their web applications if they fail to install a way for their content to reload automatically if the user tries to use the browsers back button. This happens when developers over use AJAX without trying to balance with other technologies.</p>
<p><a href="http://designreviver.com/wp-content/uploads/2010/07/ajax1.png"><img class="alignnone size-full wp-image-8007" src="http://designreviver.com/wp-content/uploads/2010/07/ajax1.png" alt="" width="415" height="351" /></a></p>
<p>Many developers and designers forget that despite the advanced technologies and the amazing evolution of the web, there are still some users that do not have a strong and stable internet connection. A good example of this is seen if you have ever played internet poker and noticed how many delays there are because other players keep losing their internet connection. There are still users that have small monitors and dial-up modems. Not everyone has a Mac Pro Quad-Core Intel Xeon â€œNehalemâ€� processor with a 30â€� monitor.</p>
<p>As a web developer or designer, there are times when you might consider using other means of interaction with your users to allow you to reach a wider audience. AJAX requires interaction with XML and JavaScript which will leave users with poor connections out in the cold.</p>
<p>As I mentioned above, a designer or developer to be successful and be able to reach a larger audience needs to have a balanced platform. I am not suggesting that you need to eliminate AJAX technology, because it is a super way to develop intriguing JavaScript applications. What I am saying is you must make sure your code is efficient and clean and you use AJAX sparely, or as needed. You also need to make sure you have all your bases covered and that all of the AJAX support information needed is in the proper place. Remember, the more AJAX running, the slower the web pages will load, which is completely opposite of the reason AJAX is so powerful.</p>
<p><a href="http://designreviver.com/wp-content/uploads/2010/07/asp-net-ajax1.png"><img class="alignnone size-full wp-image-8008" src="http://designreviver.com/wp-content/uploads/2010/07/asp-net-ajax1.png" alt="" width="415" height="363" /></a></p>
<p>One final point â€“ search engine spiders have extreme difficulty trying to pick up content when AJAX is trying to load large amounts of text. Hence, the content isnâ€™t published and indexed properly. Spiders need static content to be able to read it.</p>
<p>Ajax developersÂ at times might need to develop almost two types of applications if they want to build an online application good for Firefox and Internet Explorer browsers that could require a lot more time for application development. The end result however, is well worth it. A highlyÂ efficientÂ Ajax based application does not only provide eye catching features but could easily provide a highlyÂ effectiveÂ application with processing speed that almost rivals any simple web-based application.</p>
<img src="http://feeds.feedburner.com/~r/DesignReviver/~4/1BnvTaQik-g" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogmyquery.com/index.php/2010/07/troubles-when-developing-with-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>50 Useful JavaScript and jQuery Techniques and Plugins</title>
		<link>http://blogmyquery.com/index.php/2010/07/50-useful-javascript-and-jquery-techniques-and-plugins/</link>
		<comments>http://blogmyquery.com/index.php/2010/07/50-useful-javascript-and-jquery-techniques-and-plugins/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 12:19:42 +0000</pubDate>
		<dc:creator>vitaly</dc:creator>
				<category><![CDATA[Feeds]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.noupe.com/?p=42638</guid>
		<description><![CDATA[<table width="650"><tr><td width="650"><div style="width:650px">
      <img src="http://statisches.auslieferung.commindo-media-ressourcen.de/advertisement.gif" alt="" border="0" /><br />
      <a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=8" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=8" border="0" alt="" /></a>&#160;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=9" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=9" border="0" alt="" /></a>&#160;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=10" target="_blank"><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=10" border="0" alt="" /></a>
    </div></td></tr></table>
&#160;&#160; We are regulalry collecting useful JavaScript and jQuery snippets, libraries, articles, tools and resources and present them in compact round-ups here, on Noupe. This time we are again covering some useful JavaScript and jQuery techniques, plugins and tools that may help you improve the user experience for your site. Useful JavaScript and jQuery Techniques [...]]]></description>
			<content:encoded><![CDATA[<table width="650">
<tr>
<td width="650">
<div style="width:650px;">
      <img src="http://statisches.auslieferung.commindo-media-ressourcen.de/advertisement.gif" alt="Advertisement in 50 Useful JavaScript and jQuery Techniques and Plugins" border="0" /><br />
      <a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=8" ><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=8" border="0" alt=" in 50 Useful JavaScript and jQuery Techniques and Plugins"  /></a>&nbsp;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=9" ><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=9" border="0" alt=" in 50 Useful JavaScript and jQuery Techniques and Plugins"  /></a>&nbsp;<a href="http://auslieferung.commindo-media-ressourcen.de/www/delivery/ck.php?zoneid=10" ><img src="http://auslieferung.commindo-media-ressourcen.de/www/delivery/avw.php?zoneid=10" border="0" alt=" in 50 Useful JavaScript and jQuery Techniques and Plugins"  /></a>
    </div>
</td>
</tr>
</table>
<p>We are regulalry collecting useful JavaScript and jQuery snippets, libraries, articles, tools and resources and present them in compact round-ups here, on Noupe. This time we are again covering  some <strong>useful JavaScript and jQuery techniques, plugins and tools</strong> that may help you improve the user experience for your site.</p>
<p><span id="more-42638"></span></p>
<h3>Useful JavaScript and jQuery Techniques</h3>
<p><a href="http://tutorialzine.com/2010/03/colorful-sliders-jquery-css3/">Colorful Sliders With jQuery &amp; CSS3 </a><br /> In this tutorial we are using jQuery and the new transformation features brought by CSS3 to create a three dimensional dynamic slider effect. The techniques presented here – for creating sliders, and CSS dynamic resizable bars, can be used together or in part for powering all sorts of jQuery goodness.</p>
<p class="showcase"><a href="http://tutorialzine.com/2010/03/colorful-sliders-jquery-css3/"><img src="http://media.smashingmagazine.com/cdn_noupe/wp-content/uploads/2010/07/JS-03.jpg" alt="JS-03 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://tutorialzine.com/2010/03/sponsor-wall-flip-jquery-css/">Sponsor Flip Wall With jQuery &amp; CSS </a><br />
Designing and coding a sponsors page is part of the developer’s life (at least the lucky developer’s life, if it is about a personal site of theirs). It, however, follows different rules than those for the other pages of the site. You have to find a way to fit a lot of information and organize it clearly, so that the emphasis is put on your sponsors, and not on other elements of your design.</p>
<p class="showcase"><a href="http://tutorialzine.com/2010/03/sponsor-wall-flip-jquery-css/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-39.jpg" alt="JS-39 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://code.drewwilson.com/entry/tiptip-jquery-plugin">TipTip jQuery Plugin</a><br />
TipTip detects the edges of the browser window and will make sure the tooltip stays within the current window size. As a result the tooltip will adjust itself to be displayed above, below, to the left or to the right of the element with TipTip applied to it, depending on what is necessary to stay within the browser window.<br />
TipTip is a very lightweight and intelligent custom tooltip jQuery plugin.  It uses ZERO images and is completely customizable via CSS.</p>
<p class="showcase"><a href="http://code.drewwilson.com/entry/tiptip-jquery-plugin"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-00.jpg" alt="JS-00 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://nivo.dev7studios.com/">Nivo Slider </a><br />
The Most Awesome jQuery Image Slider</p>
<p class="showcase"><a href="http://nivo.dev7studios.com/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-02.jpg" alt="JS-02 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://www.oriontransfer.co.nz/software/jquery-syntax/index">jQuery.Syntax </a><br />
jQuery.Syntax is an extremely fast and lightweight syntax highlighter. It has dynamic loading of syntax source files and integrates cleanly using CSS or modelines.</p>
<p class="showcase"><a href="http://www.oriontransfer.co.nz/software/jquery-syntax/index"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-04.jpg" alt="JS-04 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://haineault.com/media/examples/jquery-utils/demo/ui-timepickr.html">jquery.timepickr.js</a><br />
This is my humble attempt to enhence web time picking.</p>
<p class="showcase"><a href="http://haineault.com/media/examples/jquery-utils/demo/ui-timepickr.html"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-05.jpg" alt="JS-05 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://tympanus.net/codrops/2010/03/07/photo-zoom-out-effect-with-jquery/">Photo Zoom Out Effect with jQuery</a><br />
Today we will show you how to create a simple image zoom out effect with jQuery. The idea is show some images which are zoomed in initially and when hovering over an image it gets zoomed out. This effect could be used in photography websites or image galleries. Our example uses some black and white images to focus on the effect.</p>
<p class="showcase"><a href="http://tympanus.net/codrops/2010/03/07/photo-zoom-out-effect-with-jquery/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-06.jpg" alt="JS-06 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://tympanus.net/codrops/2010/03/09/a-fresh-bottom-slide-out-menu-with-jquery/">A Fresh Bottom Slide Out Menu with jQuery</a><br />
In this tutorial we will create a unique bottom slide out menu. This large menu will contain some title and a description of the menu item. It will slide out from the bottom revealing the description text and some icon. We will use some CSS3 properties for some nice shadow effects and jQuery for the interaction.</p>
<p class="showcase"><a href="http://tympanus.net/codrops/2010/03/09/a-fresh-bottom-slide-out-menu-with-jquery/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-07.jpg" alt="JS-07 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://tutorialzine.com/2010/03/mosaic-slideshow-jquery-css/">Making a Mosaic Slideshow With jQuery &amp; CSS </a><br />
Today we are making a jQuery &amp; CSS mosaic gallery. Mosaic, because it will feature an interesting tile transition effect when moving from one slide to another.</p>
<p class="showcase"><a href="http://tutorialzine.com/2010/03/mosaic-slideshow-jquery-css/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-08.jpg" alt="JS-08 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://www.tripwiremagazine.com/2010/03/17-jquery-plugins-for-easy-and-efficient-reordering-and-filtering-page-elements.html"> 17 jQuery Plugins for Easy and Efficient Reordering and Filtering Page Elements </a><br />
Having full control of elements on a page and the order they are presented in can be quite useful. jQuery as always is a safe choice to go for. There are several good quality plugins to pick from. This post provides an overview of plugins you can use to provide simple yet powerful functionality to reorder, filter, add drag and drop capabilities etc.</p>
<p class="showcase"><a href="http://www.tripwiremagazine.com/2010/03/17-jquery-plugins-for-easy-and-efficient-reordering-and-filtering-page-elements.html"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-09.jpg" alt="JS-09 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://webitect.net/development/phpmysql/create-an-impressive-content-editing-system-with-jquery-and-php/">Create an Impressive Content Editing System with jQuery and PHP </a><br />
I’m going to show you how to use jQuery and PHP to build a content editing system that will allow you or your client to easily edit .html pages visually.</p>
<p class="showcase"><a href="http://webitect.net/development/phpmysql/create-an-impressive-content-editing-system-with-jquery-and-php/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-10.jpg" alt="JS-10 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://www.geektantra.com/projects/jquery-megamenu/index.html">jQuery MegaMenu Plugin</a></p>
<p class="showcase"><a href="http://www.geektantra.com/projects/jquery-megamenu/index.html"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-11.jpg" alt="JS-11 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://www.antsmagazine.com/2009/11/excellent-jquery-plugins-to-enhance-form-validation/">Excellent JQuery Plugins To Enhance Form Validation </a><br />
Simple jquery plugins can enhance and beautify HTML form elements, these simple jquery scripts turn a simple HTML website to a fantastic look and feel. These plugins can be enabled very easily. In this roundup I have gathered most beautiful Jquery plugins that are related to all kinds of form validation. This list also includes roundups of some blogs. Go ahead and enjoy</p>
<p><a href="http://gamequery.onaluf.org/">gameQuery &#8211; a javascript game engine with jQuery</a><br />
gameQuery is a jQuery plug-in to help make javascript game development easier by adding some simple game-related classes. It&#8217;s still in an early stage of development and may change a lot in future versions. The project has a Google Code page where the SVN repository of the project is hosted and a twitter page where you can follow the daily progress of the development.</p>
<p class="showcase"><a href="http://gamequery.onaluf.org/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-13.jpg" alt="JS-13 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://www.impressivewebs.com/buggy-css-selectors-cross-browser-jquery/">Getting Buggy CSS Selectors to Work Cross-Browser via jQuery</a><br />
Below I’ve prepared a simple table that describes a number of CSS selectors that are not cross-browser compatible, along with the jQuery syntax for each. The syntaxes are exactly the same as they would be in CSS, save for the jQuery wrapper (just remove $() and the quotes to get the CSS syntax), so using these selectors in jQuery will provide somewhat of a practice ground to prepare you for when they’re fully supported by all commonly-used browsers.</p>
<p class="showcase"><a href="http://www.impressivewebs.com/buggy-css-selectors-cross-browser-jquery/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-14.jpg" alt="JS-14 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://workshop.rs/projects/jqfancytransitions/">jqFancyTransitions: jQuery Image Rotator Plugin</a><br />
jqFancyTransitions is easy-to-use jQuery plugin for displaying your photos as slideshow with fancy transition effects.</p>
<p class="showcase"><a href="http://workshop.rs/projects/jqfancytransitions/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-15.jpg" alt="JS-15 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://coffeescripter.com/code/ad-gallery/">A demo of AD Gallery</a><br />
A highly customizable gallery/showcase plugin for jQuery.</p>
<p class="showcase"><a href="http://coffeescripter.com/code/ad-gallery/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-16.jpg" alt="JS-16 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://www.filamentgroup.com/lab/jquery_ui_selectmenu_an_aria_accessible_plugin_for_styling_a_html_select">jQuery UI Selectmenu: An ARIA-Accessible Plugin for Styling a Custom HTML Select Element </a><br />
Our latest contribution to labs is the selectmenu plugin, which is designed to duplicate and extend the functionality of a native HTML select element, and lets you customize the look and feel, add icons, and create hierarchy within the options. Best of all, it&#8217;s built with progressive enhancement and accessibility in mind, has all the native mouse and keyboard controls, and is ThemeRoller-ready.</p>
<p class="showcase"><a href="http://www.filamentgroup.com/lab/jquery_ui_selectmenu_an_aria_accessible_plugin_for_styling_a_html_select"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-17.jpg" alt="JS-17 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://www.webappers.com/2009/07/13/create-a-content-rich-tooltip-with-json-and-jquery/"> Create a Content Rich Tooltip with JSON and jQuery</a><br />
Today we’re going to break the mold of the traditional tooltip. This tutorial will demonstrate how to build tooltips that are powered by jQuery, with information pulled from a JSON array.</p>
<p class="showcase"><a href="http://www.webappers.com/2009/07/13/create-a-content-rich-tooltip-with-json-and-jquery/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-18.jpg" alt="JS-18 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://papermashup.com/jquery-image-zoom-effect/">jQuery image zoom effect </a><br />
So today I’m going to run through the technique used to zoom the image thumbnails and display the overlay of text.</p>
<p class="showcase"><a href="http://papermashup.com/jquery-image-zoom-effect/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-19.jpg" alt="JS-19 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://fredhq.com/projects/roundabout-shapes/">jQuery Roundabout Shapes</a><br />
Roundabout Shapes provide even more paths along which your Roundabout can move. The current version of Roundabout Shapes offers eleven additional movements.</p>
<p class="showcase"><a href="http://fredhq.com/projects/roundabout-shapes/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-20.jpg" alt="JS-20 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://james.padolsey.com/javascript/extending-jquerys-selector-capabilities/">Extending jQuery&#8217;s selector capabilities </a></p>
<p class="showcase"><a href="http://james.padolsey.com/javascript/extending-jquerys-selector-capabilities/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-21.jpg" alt="JS-21 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://www.skyrocketlabs.com/articles/jquery-hidden-form-input.php">How to show/hide a hidden input form field using jQuery</a><br />
This past week I was working on a project at work which included building a request form with multiple fields. It was a rather large form that included a dropdown list with an &#8216;other&#8217; option. I wanted to allow users to select the &#8216;other&#8217; option which then would show an input field so they can enter a specific description of what that &#8216;other&#8217; item is. I didn&#8217;t want to clutter the form by displaying that additional field by default so I used a little jQuery, thus displaying it dynamically and only when needed.</p>
<p class="showcase"><a href="http://www.skyrocketlabs.com/articles/jquery-hidden-form-input.php"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-22.jpg" alt="JS-22 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://www.viget.com/inspire/a-better-jquery-in-field-label-plugin/"> A Better jQuery In-Field Label Plugin</a><br />
This is a pretty nice effect, and it can really help to save space on forms. There are a billion different ways to implement this, and I don&#8217;t suggest you use the example from above because that was just a quick way to show the effect. So let&#8217;s walk through a couple of different implementation approaches and figure out the best way to implement this feature.</p>
<p class="showcase"><a href="http://www.viget.com/inspire/a-better-jquery-in-field-label-plugin/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-24.jpg" alt="JS-24 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<h3>Useful JavaScript / jQuery Tools</h3>
<p><a href="http://javascriptmvc.com/">JavaScriptMVC</a><br />
JavaScriptMVC is an open-source framework containing the best ideas in enterprise JavaScript development. It guides you to successfully completed projects by promoting best practices, maintainability, and convention over configuration.</p>
<p class="showcase"><a href="http://javascriptmvc.com/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-26.jpg" alt="JS-26 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://pegjs.majda.cz/">PEG.js &#8211; Parser Generator for JavaScript</a><br />
PEG.js is a parser generator for JavaScript based on the parsing expression grammar formalism. It enables you to easily bulid fast parsers which process complex data or computer languages. You can use it as an underlying tool when writing various data processors, transformers, interpreters, or compilers.</p>
<p class="showcase"><a href="http://pegjs.majda.cz/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-27.jpg" alt="JS-27 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://phonegap.com/"> PhoneGap </a><br />
PhoneGap is an open source development tool for building fast, easy mobile apps with JavaScript.</p>
<p class="showcase"><a href="http://phonegap.com/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-28.jpg" alt="JS-28 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://www.squarefree.com/shell/">JavaScript Shell</a><br />
A command-line interface for JavaScript and DOM.</p>
<p class="showcase"><a href="http://www.squarefree.com/shell/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-29.jpg" alt="JS-29 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://javascript.neyric.com/wireit/">WireIt &#8211; a Javascript Wiring Library</a><br />
WireIt is an open-source javascript library to create web wirable interfaces for dataflow applications, visual programming languages, graphical modeling, or graph editors.</p>
<p class="showcase"><a href="http://javascript.neyric.com/wireit/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-30.jpg" alt="JS-30 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://www.klauskomenda.com/code/javascript-programming-patterns/">JavaScript Programming Patterns </a><br />
In this article I am trying to present some of the techniques out there that I have discovered. The patterns I would like to mention are the following:<br />
- The Old-School Way<br />
- Singleton<br />
- Module Pattern<br />
- Revealing Module Pattern<br />
- Custom Objects<br />
- Lazy Function Definition</p>
<p class="showcase"><a href="http://www.klauskomenda.com/code/javascript-programming-patterns/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-31.jpg" alt="JS-31 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://www.ibm.com/developerworks/web/library/wa-jsframeworks/index.html">Compare JavaScript frameworks</a><br />
Modern Web sites and Web applications tend to rely quite heavily on client-side JavaScript to provide rich interactivity, particularly through the advent of asynchronous HTTP requests that do not require page refreshes to return data or responses from a server-side script or database system. In this article, you will discover how JavaScript frameworks make it easier and faster to create highly interactive and responsive Web sites and Web applications.</p>
<p class="showcase"><a href="http://www.ibm.com/developerworks/web/library/wa-jsframeworks/index.html"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-32.jpg" alt="JS-32 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://net.tutsplus.com/tutorials/javascript-ajax/how-to-test-your-javascript-code-with-qunit/">How to Test your JavaScript Code with QUnit </a><br />
QUnit, developed by the jQuery team, is a great framework for unit testing your JavaScript. In this tutorial, I’ll introduce what QUnit specifically is, and why you should care about rigorously testing your code.</p>
<p class="showcase"><a href="http://net.tutsplus.com/tutorials/javascript-ajax/how-to-test-your-javascript-code-with-qunit/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-33.jpg" alt="JS-33 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://jashkenas.github.com/coffee-script/">CoffeeScript</a><br />
CoffeeScript is a little language that compiles into JavaScript. Think of it as JavaScript&#8217;s less ostentatious kid brother — the same genes, roughly the same height, but a different sense of style. Apart from a handful of bonus goodies, statements in CoffeeScript correspond one-to-one with their equivalent in JavaScript, it&#8217;s just another way of saying it.</p>
<p class="showcase"><a href="http://jashkenas.github.com/coffee-script/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-34.jpg" alt="JS-34 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://blog.insicdesigns.com/2010/02/mind-blowing-javascript-experiments/"> Mind-blowing JavaScript Experiments</a><br />
The following JavaScript experiments demonstrates the amazing capabilities of the modern browsers such as Chrome and Safari. In this post I will showcase to you an array of experiments that will surely blows your mind off.</p>
<p class="showcase"><a href="http://blog.insicdesigns.com/2010/02/mind-blowing-javascript-experiments/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-35.jpg" alt="JS-35 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://jsbeautifier.org/">Online javascript beautifier</a><br />
This little beautifier will reformat and reindent bookmarklets, ugly javascript, unpack scripts packed by the popular Dean Edward&#8217;s packer, as well as deobfuscate scripts processed by javascriptobfuscator.com.</p>
<p class="showcase"><a href="http://jsbeautifier.org/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-36.jpg" alt="JS-36 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://www.evotech.net/blog/2007/08/css-javascript-character-entities/"> CSS &amp; Javascript Character Entity Calculator </a><br />
Enter your HTML Entity Character number  (such as &amp;#2335 or just 2335 &#8211; ?) to get the CSS and JS values for that entity.</p>
<p class="showcase"><a href="http://www.evotech.net/blog/2007/08/css-javascript-character-entities/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-37.jpg" alt="JS-37 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://www.appsheriff.com/web-apps/script/dygraphs-create-interactive-zoomable-charts/"> Dygraphs: Create interactive graphs from open source Javascript library </a><br />
Dygraphs is an open source JavaScript library that produces an interactive, zoom-able charts of the present time series. It is mainly designed to display the dense data sets and enable the users to explore and interpret them. It is a JavaScript Visualization Library.</p>
<p class="showcase"><a href="http://www.appsheriff.com/web-apps/script/dygraphs-create-interactive-zoomable-charts/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-38.jpg" alt="JS-38 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://attacklab.net/showdown/">Showdown &#8211; Markdown in JavaScript</a><br />
Showdown &#8211; a JavaScript port of Markdown</p>
<p class="showcase"><a href="http://attacklab.net/showdown/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-40.jpg" alt="JS-40 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://beckelman.net/post/2009/01/22/Copy-to-Clipboard-with-ZeroClipboard-Flash-10-and-jQuery.aspx"> Copy to Clipboard with ZeroClipboard, Flash 10 and jQuery</a><br />
With today’s post I will show you a contrived example to get you started. I eventually hope to add this to the contextMenu.js jQuery plugin that I use, but for now this should be pretty straight forward. I do want to note that in the demo and download I am loading the latest version of the jQuery library (1.3.1) from Google’s CDN for the first time in any of my posts. For more information on how to do this see the instructions from Google.</p>
<p class="showcase"><a href="http://beckelman.net/post/2009/01/22/Copy-to-Clipboard-with-ZeroClipboard-Flash-10-and-jQuery.aspx"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-41.jpg" alt="JS-41 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://wiki.github.com/getify/LABjs/flabjs">fLABjs</a><br />
fLABjs is a special API wrapper around LABjs which adapts the code to work properly in a file:// local filesystem environment. There are a number of things with core LABjs does which are not appropriate for local filesystems, such as XHR, special path handling rules, etc.</p>
<p class="showcase"><a href="http://wiki.github.com/getify/LABjs/flabjs"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-43.jpg" alt="JS-43 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://www.web2ajax.fr/2010/03/25/jquery-lazyload-ad-defer-advertisement-loading/">jQuery LazyLoad Ad : Delays loading of advertising</a><br />
jQuery LazyLoad Ad is a jQuery plugin that takes advantage of LazyLoad delaying ads loading.</p>
<p><a href="http://craigsworks.com/projects/qtip/">qTip &#8211; The jQuery tooltip plugin </a><br />
qTip is a tooltip plugin for the jQuery framework. It&#8217;s cross-browser, customizable and packed full of features!</p>
<p class="showcase"><a href="http://craigsworks.com/projects/qtip/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-47.jpg" alt="JS-47 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://www.exforsys.com/tutorials/jquery/jquery-collapsing-and-expanding-table-rows.html"> jQuery Collapsing and Expanding Table Rows </a></p>
<p class="showcase"><a href="http://www.exforsys.com/tutorials/jquery/jquery-collapsing-and-expanding-table-rows.html"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-48.jpg" alt="JS-48 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://yensdesign.com/2009/01/improving-search-boxes-with-jquery/">Improving Search Boxes with jQuery </a><br />
This time we will learn how to improve a little more our sites by adding some additional interactions to our search boxes like autofocus, highlighting, autoreplace default text and more by using jQuery.</p>
<p class="showcase"><a href="http://yensdesign.com/2009/01/improving-search-boxes-with-jquery/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-49.jpg" alt="JS-49 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://www.trirand.com/blog/?page_id=6">jQuery Grid Plugin </a></p>
<p class="showcase"><a href="http://www.trirand.com/blog/?page_id=6"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-50.jpg" alt="JS-50 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://pines.svn.sourceforge.net/viewvc/pines/trunk/pnotify/index.html">Pines Notify jQuery Plugin</a><br />
Pines Notify&#8217;s features include:<br />
- Timed hiding with visual effects.<br />
- Sticky (no automatic hiding) notices.<br />
- Optional hide button.<br />
- Supports dynamically updating text, title, icon, type&#8230;<br />
- Stacks allow notice sets to stack independently.<br />
- Control stack direction and push to top or bottom.</p>
<p class="showcase"><a href="http://pines.svn.sourceforge.net/viewvc/pines/trunk/pnotify/index.html"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-51.jpg" alt="JS-51 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<p><a href="http://blog.egorkhmelev.com/2009/11/jquery-slider-safari-style/">jQuery Slider plugin (Safari style) </a><br />
jQuery Slider is easy to use and multifunctional jQuery plugin.</p>
<p class="showcase"><a href="http://blog.egorkhmelev.com/2009/11/jquery-slider-safari-style/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/04/JS-52.jpg" alt="JS-52 in 50 Useful JavaScript and jQuery Techniques and Plugins" width="480" height="300" /></a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Noupe?a=SDuHQcgQ-qI:L1UG3f796Cw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Noupe?i=SDuHQcgQ-qI:L1UG3f796Cw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Noupe?a=SDuHQcgQ-qI:L1UG3f796Cw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Noupe?i=SDuHQcgQ-qI:L1UG3f796Cw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Noupe?a=SDuHQcgQ-qI:L1UG3f796Cw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Noupe?i=SDuHQcgQ-qI:L1UG3f796Cw:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Noupe?a=SDuHQcgQ-qI:L1UG3f796Cw:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Noupe?d=7Q72WNTAKBA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://blogmyquery.com/index.php/2010/07/50-useful-javascript-and-jquery-techniques-and-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Things A Front-End Developer Should Know</title>
		<link>http://blogmyquery.com/index.php/2010/07/things-a-front-end-developer-should-know/</link>
		<comments>http://blogmyquery.com/index.php/2010/07/things-a-front-end-developer-should-know/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 13:46:49 +0000</pubDate>
		<dc:creator>speckyboy</dc:creator>
				<category><![CDATA[Feeds]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://designreviver.com/?p=8186</guid>
		<description><![CDATA[There are no clear and defined skill-sets a developer should have to build a web site, with so many different technological possibilities it can be difficult deciding which to focus on. A question on this subject was recently asked on Answers, so, what skills do you think a front-end developer should have?

You can leave your [...]]]></description>
			<content:encoded><![CDATA[<p>There are no clear and defined skill-sets a developer should have to build a web site, with so many different technological possibilities it can be difficult deciding which to focus on. A question on this subject was recently asked on <a href="http://answers.designreviver.com/">Answers</a>, so, what skills do you think a front-end developer should have?</p>
<p><span id="more-8186"></span></p>
<p>You can leave your answers and thoughts below in the comment section, or you can leave your answer/opinion on the original question here: <a href="http://answers.designreviver.com/18157/">What Should a Front-End Developer Know?</a>.</p>
<h4>What Should a Front-End Developer Know?</h4>
<p><a href="http://answers.designreviver.com/18157/"><img src="http://designreviver.com/wp-content/uploads/2010/07/devfront_01.jpg" alt="What Should a Front-End Developer Know?" width="520"></a><br />
This question was originally asked by <a href="http://answers.designreviver.com/member/8429">Desi</a>, and you will find the favorite answers below:</p>
<p>Best Answer from <a href="http://answers.designreviver.com/member/5439"><strong>J.J. Nold</strong></a>:</p>
<p><a href="http://answers.designreviver.com/18157/"><img src="http://designreviver.com/wp-content/uploads/2010/07/devfront_02.jpg" alt="What Should a Front-End Developer Know?" width="520"></a></p>
<p>Second answer from an <strong>Unregistered User</strong>:</p>
<p><a href="http://answers.designreviver.com/18157/"><img src="http://designreviver.com/wp-content/uploads/2010/07/devfront_03.jpg" alt="What Should a Front-End Developer Know?" width="520"></a></p>
<h4>Unanswered Answers</h4>
<p>Just one unanswered question this week, can you help?</p>
<ol>
<li><a href="http://answers.designreviver.com/24159/">Can Anyone Explain the True Difference in jQuery and jQuery UI?</a></li>
</ol>
<p>Thanks again, firstly to everyone who asked a question, but most importantly thanks to everyone that took the time and effort to offer helpful and useful answers.</p>
<img src="http://feeds.feedburner.com/~r/DesignReviver/~4/amrmb_P4sA0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogmyquery.com/index.php/2010/07/things-a-front-end-developer-should-know/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
