<?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>Andy Girvan &#187; jquery - Andy Girvan - Freelance Web &amp; Mobile Developer, London - HTML5/JS/CSS3 -  PHP/MySQL - iOS</title>
	<atom:link href="http://andygirvan.com/tag/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://andygirvan.com</link>
	<description>Freelance Web &#38; Mobile Developer, London - HTML5/JS/CSS3 -  PHP/MySQL - iOS</description>
	<lastBuildDate>Tue, 17 Apr 2012 19:16:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>5 jQuery optimization tips from jsPerf</title>
		<link>http://andygirvan.com/2012/04/5-jquery-optimization-tips-from-jsperf/</link>
		<comments>http://andygirvan.com/2012/04/5-jquery-optimization-tips-from-jsperf/#comments</comments>
		<pubDate>Wed, 04 Apr 2012 13:19:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jquery tips]]></category>
		<category><![CDATA[jsperf]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://andygirvan.com/?p=1141</guid>
		<description><![CDATA[jQuery is a wonderful library that offers a massive amount of functionality in a nicely wrapped up package. But jQuery is quite bloated, with the minified version weighing in at 94kb. If you&#8217;re micro-optimizing, any of these little tips should help to squeeze out the hidden milliseconds on load/run time. Lucikly there is a website [...]]]></description>
			<content:encoded><![CDATA[<p>jQuery is a wonderful library that offers a massive amount of functionality in a nicely wrapped up package. But jQuery is quite bloated, with the minified version weighing in at 94kb. If you&#8217;re micro-optimizing, any of these little tips should help to squeeze out the hidden milliseconds on load/run time.</p>
<p>Lucikly there is a website called <a href="http://jsperf.com" target="_blank">jsperf.com</a> which allows you to test &#038; compare different blocks of code against each other, and see the results of each &#8211; recording how fast each block ran in which browser. Here are some simple but handy tips.</p>
<p><span id="more-1141"></span></p>
<h4>Document Ready</h4>
<p><a href="http://jsperf.com/ready/2" target="_blank">http://jsperf.com/ready/2</a></p>
<p>When calling for jQuery to fire when the whole page has loaded &#8211; aka on document ready &#8211; there are a few options available to initiate this. The test shows that the quickest, by quite a way is:</p>
<p><script type="text/javascript" src="https://gist.github.com/2300208.js?file=gistfile1.txt"></script><br />
<br /></p>
<h4>A better .each() loop</h4>
<p><a href="http://jsperf.com/jquery-each-vs-quickeach" target="_blank">http://jsperf.com/jquery-each-vs-quickeach</a></p>
<p>Looping through X amount of the same element can be quite time intensive, especially if you&#8217;re doing manipulation in each loop. The built in .each method does a decent job, but James Padolsey at jsperf has taken advantage of object caching to create a faster loop extension, called .quickEach:</p>
<p><script src="https://gist.github.com/2300218.js?file=gistfile1.txt"></script><br />
<br /></p>
<h4>CSS3 Selector vs Jquery</h4>
<p><a href="http://jsperf.com/jquery-css3-not-vs-not" target="_blank">http://jsperf.com/jquery-css3-not-vs-not</a></p>
<p>Ok, so this is a test for the latest browsers (which you should be on anyway) but this test shows that using a CSS3 selector to help jQuery navigate the code is quicker than relying on the library itself.</p>
<p><script src="https://gist.github.com/2300976.js?file=gistfile1.txt"></script><br />
<br /></p>
<h4>Switch vs If/Else</h4>
<p><a href="http://jsperf.com/switch-if-else" target="_blank">http://jsperf.com/switch-if-else</a></p>
<p>Quite an interesting one, this. It seems that an if/else conditional block is faster, in all browsers, than a switch/case block &#8211; remember this if you&#8217;ve got a switch/case block in a loop.<br />
<br /></p>
<h4>jQuery selector vs normal javascript</h4>
<p><a href="http://jsperf.com/getelementbyid-vs-jquery-id/5">http://jsperf.com/getelementbyid-vs-jquery-id/5</a></p>
<p>This is a bit obvious this one, but one that is often forgotten. This test proves that, if you can, using standard javascript is always preferable if you&#8217;re optimizing as it doesn&#8217;t require the loading of a large library before firing. Although jQuery is very useful for pretty much all web JS development, there is absolutely no excuse for using jQuery to just select a canvas element.</p>
<p><script src="https://gist.github.com/2301013.js?file=gistfile1.txt"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://andygirvan.com/2012/04/5-jquery-optimization-tips-from-jsperf/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The latest HTML5 / JavaScript game engines</title>
		<link>http://andygirvan.com/2011/07/the-latest-html5-and-javascript-game-engines/</link>
		<comments>http://andygirvan.com/2011/07/the-latest-html5-and-javascript-game-engines/#comments</comments>
		<pubDate>Tue, 19 Jul 2011 10:00:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[engine]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://andygirvan.com/?p=700</guid>
		<description><![CDATA[In the age of multiple platforms and smartphones there is one definite feature is supported by all - a browser. Running with this idea is latest innovation in browser gaming - the gaming engine.]]></description>
			<content:encoded><![CDATA[<p>In the age of multiple platforms and smartphones there is one definite feature which is supported by all &#8211; a browser. Running with this idea is the latest innovation in browser gaming &#8211; the gaming engine.</p>
<p><span id="more-700"></span></p>
<h2><a href="http://impactjs.com/" target="_blank">Impact &#8211; HTML5 Canvas &amp; JavaScript Game Engine</a></h2>
<p><a href="http://impactjs.com/" target="_blank">Impact</a> is, it claims, the &#8220;<em>most awesomest way to create even more HTML 5 games</em>&#8221; and at first glance, you&#8217;d be hard pressed to argue against that. The slick website demonstrating the engine shows a game created using the engine running on browsers both on desktops and on mobile. It also comes with its own <a href="http://impactjs.com/documentation/video-tutorial-weltmeister" target="_blank">dedicated level editor</a> so people who are more design orientated are looked after as well.</p>
<p>The engine&#8217;s greatest strength is its well written and nicely <a href="http://impactjs.com/documentation/class-reference/game" target="_blank">presented documentation</a> &#8211; with examples of each class in action. All this for just $99 is a steal &#8211; however there are free alternatives out there&#8230;</p>
<h2><a href="http://www.limejs.com/" target="_blank">LimeJS HTML5 Game Framework</a></h2>
<p>Available via <a href="http://www.github.com/digitalfruit/limejs" target="_blank">Github</a>, <a href="http://www.limejs.com/" target="_blank">LimeJS</a> is entirely free and open source &#8211; allowing you to build fast and (more importantly) native-experience games for multiple platforms. It has a decent community around it, however it does seem to suffer from the &#8220;too many cooks&#8221; issue and the documentation is poorly presented &#8211; offering little more than is absolutely necessary. As a free alternative, however, you&#8217;d be hard-pressed to find anything better suited for HTML5 game development.</p>
<h2><a href="http://jawsjs.com/" target="_blank">JawsJS</a></h2>
<p>More of an individual&#8217;s attempt to work with HTML5 canvas, <a href="http://jawsjs.com/" target="_blank">JawsJS</a> definitely has some legs. It has since been extended beyond the canvas and the developer promises plenty of updates in the following few months. Definitely one to watch.</p>
<h2><a href="http://gamequery.onaluf.org/" target="_blank">GameQuery</a></h2>
<p>Perhaps the one that interests me the most, <a href="http://gamequery.onaluf.org/" target="_blank">GameQuery</a> attempts to create a gaming engine based around the already fantastic jQuery framework. The developers are specifically promising that it will be easy, quick and stick to the jQuery philosophy. As an avid <a href="/category/development/javascriptjquery/">jQuery fan myself</a>, this one has me excited. Supporting solid gaming features such as collision detection and animation and promising that beginners can develop basic 2D games &#8211; this could do for game development what jQuery did for carousels.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://andygirvan.com/2011/07/the-latest-html5-and-javascript-game-engines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blankit for jQuery &#8211; set your targets to blank.</title>
		<link>http://andygirvan.com/2011/06/blankit-for-jquery-set-your-targets-to-blank/</link>
		<comments>http://andygirvan.com/2011/06/blankit-for-jquery-set-your-targets-to-blank/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 13:27:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[blankit]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[target]]></category>

		<guid isPermaLink="false">http://andygirvan.com/?p=638</guid>
		<description><![CDATA[The latest addition to my ever growing list of projects on Github is Blankit - a jQuery plugin for adding target="_blank" to any matching elements.]]></description>
			<content:encoded><![CDATA[<p>The latest addition to my ever growing list of projects on Github is <a href="https://github.com/andygirvan/Blankit" target="_blank">Blankit</a> &#8211; a jQuery plugin for adding target=&#8221;_blank&#8221; to any matching elements. This was done to avoid the issue of creating a long, content heavy, page and having to go through and manually add target=&#8221;_blank&#8221; to each a element. This plugin was also contributed to by <a href="http://twitter.com/spol" target="_blank">Seb Pollard</a>, the technical ninja that he is.</p>
<p>Check it out: <a href="https://github.com/andygirvan/Blankit" target="_blank">on github</a> or <a href="http://andygirvan.com/blankit" target="_blank">try out the demo</a>.</p>
<p><span id="more-638"></span></p>
<p>The plugin takes 3 options allowing you to customize it to suit your needs; same domain links can be included as can list elements, and previously set target attributes can be overridden.</p>
<h2>How to use</h2>
<p>[box icon="code"]</p>
<p>$ ( &#8220;a&#8221; ).blankit( { option: value } );</p>
<p>[/box]</p>
<h2>Options</h2>
<p>[box icon="code]<br />
// Any previously set targets will be overridden with the new _blank value.<br />
override: (default: false)</p>
<p>// This will include any anchor tags that are in a list (usually menu element).<br />
listitems: (default: false)</p>
<p>// This will include/exclude the internal links from having blank set as a target property.<br />
samedomain: (default: false)<br />
[/box]</p>
<p>Check it out &amp; tell me your thoughts. Don&#8217;t forget you can also <a href="https://github.com/andygirvan/Blankit" target="_blank">fork it</a> and use it however you want. There is also more information on the plugin at <a href="http://plugins.jquery.com/project/Blankit" target="_blank">plugins.jquery.com</a></p>
<p>[line]</p>
<p>If you enjoyed this post, why not subscribe to <a href="http://andygirvan.com/feed/">my feed</a> or check me out on <a href="http://twitter.com/andygirvan">Twitter</a>.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://andygirvan.com/2011/06/blankit-for-jquery-set-your-targets-to-blank/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>HTML5/CSS3 Examples</title>
		<link>http://andygirvan.com/2011/06/html5-css3-examples/</link>
		<comments>http://andygirvan.com/2011/06/html5-css3-examples/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 12:43:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[demonstration]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jquery mobile]]></category>
		<category><![CDATA[localstorage]]></category>

		<guid isPermaLink="false">http://andygirvan.com/?p=533</guid>
		<description><![CDATA[Over the past few days, I've been throwing together a few examples of HTML5/CSS3 and what can be done.]]></description>
			<content:encoded><![CDATA[<p>Over the past few days, I&#8217;ve been throwing together a few examples of HTML5/CSS3 and what can be done.</p>
<p><span id="more-533"></span></p>
<p>Right now, I&#8217;ve built demonstrations of :</p>
<ul>
<li><a href="http://andygirvan.com/playground/shapes/" target="_blank">Shapes</a></li>
<li><a href="http://andygirvan.com/playground/animation/" target="_blank">Animation</a></li>
<li><a href="http://andygirvan.com/playground/localstorage/" target="_blank">Local Storage</a></li>
<li><a href="http://andygirvan.com/playground/mobile/" target="_blank">Mobile</a> (using <a href="http://jquerymobile.com/" target="_blank">jQuery mobile</a>)</li>
</ul>
<p>As with most fancy HTML5/CSS3 stuff, the latest browsers are required so those of you with IE6/7 please <a href="http://www.google.com/chrome/" target="_blank">consider</a> <a href="http://www.mozilla.com/en-US/firefox/new/" target="_blank">upgrading</a> <a href="http://www.apple.com/safari/" target="_blank">your</a> <a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home" target="_blank">browser</a>.</p>
<p>The code for these is available on <a href="https://github.com/andygirvan/HTML5-CSS3" target="_blank">Github</a> so feel free to pull and use wherever/whenever.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://andygirvan.com/2011/06/html5-css3-examples/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>6 jQuery plugins that are a little bit different</title>
		<link>http://andygirvan.com/2011/01/6-jquery-plugins-that-are-a-little-bit-different/</link>
		<comments>http://andygirvan.com/2011/01/6-jquery-plugins-that-are-a-little-bit-different/#comments</comments>
		<pubDate>Mon, 31 Jan 2011 13:47:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[face detection]]></category>
		<category><![CDATA[google map]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jmapping]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://andygirvan.com/?p=233</guid>
		<description><![CDATA[To prove to myself that there was more to jQuery than content scrollers, I did some Google'ing and found 6 really unique jQuery plugins/extensions that are worth taking a look at.]]></description>
			<content:encoded><![CDATA[<p>When looking for a jQuery plugin, it can often get a bit tedious scrolling through page after page of scrollers, carousels and crop tools. At one point I ran into an article named &#8220;28 Useful JQuery Sliders You Need To Download&#8221;. Twenty-eight?! Blimey.</p>
<p>So, to prove to myself that there was more to jQuery than content scrollers, I did some Google&#8217;ing and found 6 really unique jQuery plugins/extensions that are worth taking a look at.</p>
<p><span id="more-862"></span></p>
<h3>6 &#8211; Face Detection (<a href="http://facedetection.jaysalvat.com/" target="_blank">http://facedetection.jaysalvat.com/</a>)</h3>
<p style="text-align: center;"><a href="http://facedetection.jaysalvat.com"><img class="aligncenter size-full wp-image-249" title="face-detection" src="http://andygirvan.com/wp-content/uploads/2011/01/face-detection1.jpg" alt="" width="490" height="134" /></a></p>
<p>Brilliant jQuery tool for scanning pictures for faces and returning the locations. Fantastic when applied with a user membership or avatar system, allowing you to extend or improve your cropping tool.</p>
<h3>5 &#8211; jMapping (<a href="http://vigetlabs.github.com/jmapping/" target="_blank">http://vigetlabs.github.com/jmapping/</a>)</h3>
<p style="text-align: center;"><a href="http://vigetlabs.github.com/jmapping/"><img class="aligncenter size-full wp-image-253" title="jmapping" src="http://andygirvan.com/wp-content/uploads/2011/01/jmapping.jpg" alt="" width="490" height="134" /></a></p>
<p>jQuery extension for easily adding Google Maps to any page with extensive customisation options. Also very good at degrading gracefully. If you&#8217;re rolling out a store locator this could be a better alternative than using any WordPress plugins which are somewhat limited without hacking.</p>
<h3>4 &#8211; JSZip (<a href="http://jszip.stuartk.co.uk/" target="_blank">http://jszip.stuartk.co.uk/</a>)</h3>
<p>Nothing ground breaking here, just a useful library allowing you to compress and zip up files for download using the jQuery framework.</p>
<h3>3 &#8211; Colortip (<a href="http://bit.ly/9o5QS5" target="_blank">http://bit.ly/9o5QS5</a>)</h3>
<p style="text-align: center;"><a href="http://bit.ly/9o5QS5"><img class="aligncenter size-full wp-image-254" title="color-tip" src="http://andygirvan.com/wp-content/uploads/2011/01/color-tip.jpg" alt="" width="420" height="113" /></a></p>
<p>Tool tips are a fantastic tool for adding usability to a site, which may perhaps be confusing without.</p>
<h3>2 &#8211; Fancy Sliding Form (<a href="http://bit.ly/bnkYUG" target="_blank">http://bit.ly/bnkYUG</a>)</h3>
<p style="text-align: center;"><a href="http://bit.ly/bnkYUG"><img class="aligncenter size-full wp-image-255" title="fancy-sliding" src="http://andygirvan.com/wp-content/uploads/2011/01/fancy-sliding.jpg" alt="" width="521" height="146" /></a></p>
<p>Any library that makes it easier to deal with complex forms is worth the time to look. This makes it a lot simpler to create a tidy, one page form.</p>
<h3>1 &#8211; Lettering (<a href="http://letteringjs.com/" target="_blank">http://letteringjs.com/</a>)</h3>
<p style="text-align: center;"><a href="http://letteringjs.com/"><img class="aligncenter size-full wp-image-256" title="letterings" src="http://andygirvan.com/wp-content/uploads/2011/01/letterings.jpg" alt="" width="514" height="156" /></a></p>
<p>If you&#8217;re sick of seeing the same old Tahoma &amp; Arial&#8217;s throughout the web, then this might be the plug-in for you. Taking the idea of custom fonts with CSS, this library offers down to the letter control over your typography and some of the examples on <a href="http://letteringjs.com/" target="_blank">their site</a> are breathtaking.</p>
]]></content:encoded>
			<wfw:commentRss>http://andygirvan.com/2011/01/6-jquery-plugins-that-are-a-little-bit-different/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why use Flash when you&#8217;ve got JS/CSS?</title>
		<link>http://andygirvan.com/2010/11/why-use-flash-when-youve-got-js-css/</link>
		<comments>http://andygirvan.com/2010/11/why-use-flash-when-youve-got-js-css/#comments</comments>
		<pubDate>Thu, 11 Nov 2010 11:27:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://andygirvan.com/?p=183</guid>
		<description><![CDATA[With CSS3/JavaScript you can do all kinds of cool looking things...]]></description>
			<content:encoded><![CDATA[<p>With <strong>CSS3/JavaScript</strong> you can do all kinds of cool looking things:</p>
<p><span id="more-183"></span></p>
<ul>
<li><a href="http://www.is-real.net/experiments/css3/wonder-webkit/" target="_blank">CSS3 Transformations</a></li>
<li><a href="http://www.zurb.com/playground/css3-polaroids" target="_blank">CSS3 Polaroids</a></li>
<li><a href="http://css-tricks.com/examples/StarryNightCSS3/" target="_blank">Starry Night in CSS3 &#8211; Scrolling Backgrounds</a></li>
<li><a href="http://www.paulrhayes.com/experiments/clock/#clock" target="_blank">Analogue Clock</a></li>
<li><a href="http://www.paulrhayes.com/experiments/cube/index.html" target="_blank">3D Cube</a></li>
<li><a href="http://demo.marcofolio.net/jquery_dj/" target="_blank">DJ Deck in CSS3 and jQuery</a></li>
<li><a href="http://demo.marcofolio.net/jpong/" target="_blank">jPong &#8211; Pong build in jQuery</a></li>
</ul>
<p>(most of these work best in the latest browsers (Chrome, Safari 5, Firefox))</p>
<p>As you can see, you don’t have to limit yourself to building interactive animations in Flash that won’t work on iPhone/iPad, or having to build a platform-locked application (like an app on the app store). But remember:</p>
<blockquote><p>&#8220;Similar to Flash, just because you can do it, doesn&#8217;t mean you always should.&#8221; <a href="http://www.twitter.com/kuatofkuat">@kuatofkuat</a></p></blockquote>
<p>Finally, the guys who created jQuery (our lovable Javascript library!) have only gone and created jQuery Mobile, which will allow you to build a website &#8211; once &#8211; and it will work and look good on <em>all</em> mobile devices.</p>
<p>Check it out at <a href="http://jquerymobile.com/">http://jquerymobile.com/</a> and the demos <a href="http://jquerymobile.com/demos/1.0a1/">http://jquerymobile.com/demos/1.0a1/</a> (try on any mobile device)</p>
]]></content:encoded>
			<wfw:commentRss>http://andygirvan.com/2010/11/why-use-flash-when-youve-got-js-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

