<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Devon Govett</title>
	<atom:link href="http://devongovett.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://devongovett.wordpress.com</link>
	<description>Web design and development thoughts</description>
	<lastBuildDate>Wed, 22 May 2013 08:50:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='devongovett.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Devon Govett</title>
		<link>http://devongovett.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://devongovett.wordpress.com/osd.xml" title="Devon Govett" />
	<atom:link rel='hub' href='http://devongovett.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Badass JavaScript: A Showcase of Awesome JavaScript Code</title>
		<link>http://devongovett.wordpress.com/2010/06/17/badass-javascript-a-showcase-of-awesome-javascript-code/</link>
		<comments>http://devongovett.wordpress.com/2010/06/17/badass-javascript-a-showcase-of-awesome-javascript-code/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 16:13:58 +0000</pubDate>
		<dc:creator>devongovett</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[project]]></category>

		<guid isPermaLink="false">https://devongovett.wordpress.com/2010/06/17/badass-javascript-a-showcase-of-awesome-javascript-code/</guid>
		<description><![CDATA[A few weeks ago, I launched a new blog called Badass JavaScript (http://badassjs.com). It showcases an awesome piece of JavaScript code every day. So far, it has been a success! Here are some of the awesome things that have been showcased so far: Barcode Scanning In JavaScript Music Notation with HTML5 Canvas TypeSet: An implementation [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devongovett.wordpress.com&#038;blog=6814821&#038;post=177&#038;subd=devongovett&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="clear:both;">A few weeks ago, I launched a new blog called <a href="http://badassjs.com/" target="_blank">Badass JavaScript</a> (<a href="http://badassjs.com" target="_blank">http://badassjs.com</a>). It showcases an awesome piece of JavaScript code every day. So far, it has been a success! Here are some of the awesome things that have been showcased so far:</p>
<ol style="clear:both;">
<li><a href="http://badassjs.com/post/654334959/barcode-scanning-in-javascript" target="_blank">Barcode Scanning In JavaScript</a></li>
<li><a href="http://badassjs.com/post/657877003/music-notation-with-html5-canvas" target="_blank">Music Notation with HTML5 Canvas</a></li>
<li><a href="http://badassjs.com/post/681180037/typeset-an-implementation-of-the-tex-line-breaking" target="_blank">TypeSet: An implementation of the TEX Line Breaking Algorithm in JavaScript</a></li>
<li><a href="http://badassjs.com/post/681361932/realtime-video-to-ascii-converter-in-javascript" target="_blank">Realtime Video to ASCII Converter In JavaScript</a></li>
<li><a href="http://badassjs.com/post/701025978/the-aves-engine-high-performance-games-in-javascript" target="_blank">The Aves Engine: High Performance Games In JavaScript</a></li>
<li><a href="http://badassjs.com/post/707996695/sencha-touch-a-cross-platform-html5-mobile-application" target="_blank">Sencha Touch: A Cross Platform HTML5 Mobile Application Framework</a></li>
</ol>
<p style="clear:both;"><a href="http://badassjs.com/" target="_blank">Check it out</a>!</p>
<p><br class="final-break" style="clear:both;" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/devongovett.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/devongovett.wordpress.com/177/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devongovett.wordpress.com&#038;blog=6814821&#038;post=177&#038;subd=devongovett&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devongovett.wordpress.com/2010/06/17/badass-javascript-a-showcase-of-awesome-javascript-code/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75d72a45e763d7c4d2d645596f173de5?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">devongovett</media:title>
		</media:content>
	</item>
		<item>
		<title>5 Reasons Why Google&#8217;s WebM Video Codec Will Fail</title>
		<link>http://devongovett.wordpress.com/2010/05/31/5-reasons-why-googles-webm-video-codec-will-fail/</link>
		<comments>http://devongovett.wordpress.com/2010/05/31/5-reasons-why-googles-webm-video-codec-will-fail/#comments</comments>
		<pubDate>Mon, 31 May 2010 14:03:19 +0000</pubDate>
		<dc:creator>devongovett</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[webm]]></category>

		<guid isPermaLink="false">https://devongovett.wordpress.com/?p=169</guid>
		<description><![CDATA[At Google I/O last week, Google announced that it would be open sourcing what it calls the WebM video codec. Immediately, there was talk about this &#8220;open&#8221; codec becoming the video format of the web, with browsers like Firefox and Opera jumping on the bandwagon as fast as they could. While I think that it [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devongovett.wordpress.com&#038;blog=6814821&#038;post=169&#038;subd=devongovett&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="clear:both;"><a href="http://devongovett.files.wordpress.com/2010/05/webm-devpreview3.png" class="image-link"><img class="linked-to-original" src="http://devongovett.files.wordpress.com/2010/05/webm-devpreview3-thumb.png?w=180&#038;h=47" height="47" align="left" width="180" style="display:inline;float:left;margin:0 10px 10px 0;" /></a>At Google I/O last week, Google announced that it would be open sourcing what it calls the WebM video codec. Immediately, there was talk about this &#8220;open&#8221; codec becoming the video format of the web, with browsers like Firefox and Opera jumping on the bandwagon as fast as they could. While I think that it is great to have an open codec, not encumbered by patents, and that anyone can produce and consume freely, I also think that we are already so entrenched with h.264 video that it will be almost impossible to just &#8220;switch&#8221; to this new codec. Here is why all of the hype around this codec is unfounded:</p>
<ol style="clear:both;">
<li><strong>h.264 is already available nearly everywhere</strong> &#8211; h.264 video is viewable on nearly all devices. It is available on both Mac and Windows computers with no installation necessary, on nearly every mobile device including the iPhone, iPad, and even Android devices. This ubiquity will make it hard to compete with.</li>
<li><strong>Lack of hardware decoders</strong> &#8211; there are hardware decoders for h.264 video in almost every mobile device, and even some laptops and desktops. This makes decoding h.264 video very fast, and uses less CPU cycles than a software decoder would, while raising the battery life considerably. The reason that you can watch a movie for 10 hours straight on an iPad is because the hardware decoder for the h.264 video uses very little power. So why can&#8217;t these devices just add a WebM hardware decoder? First of all such a chip doesn&#8217;t exist yet, but more importantly, there probably isn&#8217;t the room for two decoders in today&#8217;s already cramped devices. For instance, all of the video in Apple&#8217;s iTunes store is encoded using h.264, and thus they need the h.264 decoding chips in their devices. They are not going to add a second chip just unless several <em>major</em> content producers switch their videos to WebM with no h.264 fallback.</li>
<li><strong>Lack of encoders</strong> &#8211; applications that produce video content do not export WebM video, but they do export h.264. This can be consumer grade applications like iMovie or Windows Movie Maker, or professional applications like Final Cut. Of course, you can get a converter, but that adds an additional step that, depending on how long your video is, could take a long time (video conversions are slow). Also, depending on browser support, they may need to produce a WebM version, an h.264 version, as well as a Flash version. I don&#8217;t think that content producers are going to want to do this, just so that their videos can be in an &#8220;open&#8221; format.</li>
<li><strong>Patents</strong> &#8211; Apple and Microsoft both have patents in h.264 video, and they probably don&#8217;t want to lose their investment to an open source codec. In the case of Apple, they also have millions of videos that they sell in the h.264 format. They aren&#8217;t just going to convert it to WebM overnight.</li>
<li><strong>Content producers will not want to switch</strong> &#8211; content producers have just begun switching to h.264 and away from Flash so that they can gain support on mobile devices that don&#8217;t support Flash, like the iPhone. They won&#8217;t want to switch video formats yet again. There isn&#8217;t a compelling reason for them to switch &#8211; h.264 is supported everywhere, and where it isn&#8217;t (like Firefox) they can provide Flash fallback (which plays h.264). One format everywhere.</li>
</ol>
<p style="clear:both;">
<h2>Question of Openness</h2>
</p>
<p style="clear:both;">While Google <a href="http://www.webmproject.org/about/">touts</a> WebM as &#8220;open for anyone to implement and improve,&#8221; h.264 is open as well &#8211; it just isn&#8217;t free. According to <a href="http://www.engadget.com/2010/05/04/know-your-rights-h-264-patent-licensing-and-you/">Engadget</a>:</p>
<blockquote style="clear:both;"><p>Although H.264 is an <em>open</em> standard, in that it was developed by a consortium of companies and anyone can make and sell an encoder or decoder, it&#8217;s not <em>free</em> &#8212; you&#8217;ve got to pay for a royalty fee to use it, and the rates are set by the MPEG-LA, which collects payments and distributes them to its members.</p>
</blockquote>
<p style="clear:both;">It seems to me that whenever something is touted as &#8220;open,&#8221; it immediately gets all sorts of hype. Open has become a buzzword like Ajax was a few years ago. It seems that everything open is automatically &#8220;better,&#8221; and I think that this is wrong. I think that instead of assuming the superiority of an &#8220;open&#8221; product, we should instead be treating it like any other product, letting the best format win. Mozilla doesn&#8217;t really have to pay the royalties for including h.264 support in Firefox because they could just as easily shell out this task to the operating system, which already supports the playback of h.264 video and pays the royalties. While I understand the concerns that Mozilla has with using a closed video format, I don&#8217;t think that this should stop them from using the <strong>defacto standard</strong> for video that h.264 has become.</p>
<p style="clear:both;">
<h2>Bottom Line</h2>
<p>Big companies have a lot of money in h.264 video which is already ubiquitously available, easy to encode, and fast to decode with low powered hardware decoders. Content producers have already invested time and money in switching away from Flash to h.264 and will not want to invest more time and money in order to switch to WebM. h.264 has become the defacto standard for video, and I just don&#8217;t see this changing overnight. This is why I think that the WebM video codec, as much as it is hyped, will fail.</p>
<p><br class="final-break" style="clear:both;" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/devongovett.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/devongovett.wordpress.com/169/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devongovett.wordpress.com&#038;blog=6814821&#038;post=169&#038;subd=devongovett&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devongovett.wordpress.com/2010/05/31/5-reasons-why-googles-webm-video-codec-will-fail/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75d72a45e763d7c4d2d645596f173de5?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">devongovett</media:title>
		</media:content>

		<media:content url="http://devongovett.files.wordpress.com/2010/05/webm-devpreview3-thumb.png" medium="image" />
	</item>
		<item>
		<title>How To Make jQuery.empty Over 10x Faster</title>
		<link>http://devongovett.wordpress.com/2009/12/12/how-to-make-jquery-empty-over-10x-faster/</link>
		<comments>http://devongovett.wordpress.com/2009/12/12/how-to-make-jquery-empty-over-10x-faster/#comments</comments>
		<pubDate>Sat, 12 Dec 2009 23:11:27 +0000</pubDate>
		<dc:creator>devongovett</dc:creator>
				<category><![CDATA[Web development]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://devongovett.wordpress.com/2009/12/12/how-to-make-jquery-empty-over-10x-faster/</guid>
		<description><![CDATA[jQuery has a function called empty, which removes all child elements from a given element. Internally, empty is used in the html function, and many other places. Speed is an important thing to web application developers which I have blogged about in the past. In my case, I was writing a highly dynamic app with [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devongovett.wordpress.com&#038;blog=6814821&#038;post=166&#038;subd=devongovett&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="clear:both;">jQuery has a function called empty, which removes all child elements from a given element. Internally, empty is used in the html function, and many other places. Speed is an important thing to web application developers which I have <a href="http://devongovett.wordpress.com/2009/12/01/event-delegated-drag-and-drop-jquery-plugin/" target="_blank">blogged</a> <a href="http://devongovett.wordpress.com/2009/12/08/jquery-dom-manipulation-at-lighting-speeds/" title="">about</a> in the past. In my case, I was writing a highly dynamic app with jQuery, and the empty function was a performance bottleneck for me since the element I was emptying often contained over 500 children.</p>
<p style="clear:both;">The implementation of jQuery&#8217;s empty function is fairly simple: iterate through all of the elements children and remove them one by one. As I have <a href="http://devongovett.wordpress.com/2009/12/08/jquery-dom-manipulation-at-lighting-speeds/">written about before</a>, every time you modify the DOM so that the layout changes, the browser must reflow and repaint. Thus when jQuery iterates over all of the child nodes removing them one by one, the browser must reflow after each removal. This can be slow if you are dealing with a lot of elements.</p>
<p style="clear:both;">
<h2>How can we make this faster?</h2>
</p>
<p style="clear:both;">I initially thought that it would be faster to set the element&#8217;s innerHTML property to &#8220;&#8221; than to iterate, and I was right in most circumstances. Unfortunately, there are problems using innerHTML such as it being impossible to set the innerHTML of a table row in IE, which jQuery solves in the jQuery.html function. Using jQuery.html(&#8220;&#8221;) turned out to be faster than jQuery.empty() in all browsers except Firefox.</p>
<p style="clear:both;">After a little digging, and a lot of performance testing, I had a method that was much faster than jQuery.empty() &#8211; in some cases up to 10x the speed. Here is the method:</p>
<pre style="clear:both;">jQuery.fn.removeAll = function() {
	this.each(function() {
		var newEl = this.cloneNode(false);
		this.parentNode.replaceChild(newEl, this);
		
		//Copy back events if they haven't been copied already by IE
		if(jQuery.support.noCloneEvent) {
			cloneCopyEvent($(this), $(newEl));
		}
	});
};
</pre>
<p style="clear:both;">This function loops through all of the selected jQuery objects, and removes the children from all of them. Rather than iterating over all of the children in order to remove them, we simply clone the parent with deep clone set to false. This means that the parent element will be cloned but not the child elements. Once we have this clone in memory, we simply replace the existing element with the new element thereby removing all of the children. Unfortunately, in W3C compliant browsers cloneNode does not clone events attached to the original element along with the element itself, so we have to copy them back over. IE copies them over with cloneNode automatically, and luckily jQuery has a flag that lets us no whether the elements haven&#8217;t been copied over, in the form of jQuery.support.noCloneEvent. I&#8217;m using the internal jQuery function cloneCopyEvent to copy the events over.</p>
<p style="clear:both;">
<h2>The Benchmarks</h2>
</p>
<p style="clear:both;">I created several charts detailing the performance increases in various browsers. All of the tests were done on the same machine with the latest versions of each of the 4 major browsers and the latest <a href="http://blog.jquery.com/2009/12/04/jquery-14-alpha-1-released/">beta of jQuery 1.4</a>. As an interesting side note, IE and Firefox are far faster than the Webkit based browsers Chrome and Safari at removing elements from the DOM. This is interesting because both of those browsers are known for their speed. Here are the charts. I&#8217;ve created an overview chart and a breakdown by browser. <a href="http://devongovett.files.wordpress.com/2009/12/jquery-test-results.pdf">Click to download a PDF</a>.</p>
<p style="clear:both;"><a href="http://devongovett.files.wordpress.com/2009/12/jquery-test-results.pdf" class="image-link"><img src="http://devongovett.files.wordpress.com/2009/12/jquery_test_results2-thumb1.png?w=380&#038;h=285" height="285" width="380" style="text-align:center;display:block;margin:0 auto 10px;" /></a></p>
<p style="clear:both;"><a href="http://devongovett.files.wordpress.com/2009/12/jquery-test-results.pdf" class="image-link"><img src="http://devongovett.files.wordpress.com/2009/12/breakdown-thumb2.png?w=380&#038;h=285" height="285" width="380" style="text-align:center;display:block;margin:0 auto 10px;" /></a>Summary: This implementation of jQuery.empty can be over 10 times faster than the version included with jQuery beta 1.4.</p>
<p style="clear:both;">I will be submitting this as a patch to the jQuery team, so you may see this code in jQuery sometime in the future!</p>
<p><br class="final-break" style="clear:both;" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/devongovett.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/devongovett.wordpress.com/166/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devongovett.wordpress.com&#038;blog=6814821&#038;post=166&#038;subd=devongovett&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devongovett.wordpress.com/2009/12/12/how-to-make-jquery-empty-over-10x-faster/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75d72a45e763d7c4d2d645596f173de5?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">devongovett</media:title>
		</media:content>

		<media:content url="http://devongovett.files.wordpress.com/2009/12/jquery_test_results2-thumb1.png" medium="image" />

		<media:content url="http://devongovett.files.wordpress.com/2009/12/breakdown-thumb2.png" medium="image" />
	</item>
		<item>
		<title>jQuery DOM Manipulation At Lightning Speeds</title>
		<link>http://devongovett.wordpress.com/2009/12/08/jquery-dom-manipulation-at-lighting-speeds/</link>
		<comments>http://devongovett.wordpress.com/2009/12/08/jquery-dom-manipulation-at-lighting-speeds/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 21:44:08 +0000</pubDate>
		<dc:creator>devongovett</dc:creator>
				<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://devongovett.wordpress.com/?p=149</guid>
		<description><![CDATA[I posted recently about a drag and drop plugin that I had created in the name of performance, but this was not the only performance bottleneck that I had to overcome in my application. As I said before, my application has two lists, one of which depends on the selection of the other for its [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devongovett.wordpress.com&#038;blog=6814821&#038;post=149&#038;subd=devongovett&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="clear:both;"><a href="http://devongovett.wordpress.com/2009/12/01/event-delegated-drag-and-drop-jquery-plugin/" target="_blank">I posted recently</a> about a drag and drop plugin that I had created in the name of performance, but this was not the only performance bottleneck that I had to overcome in my application. As I said before, my application has two lists, one of which depends on the selection of the other for its content. Whenever the selection of the first list changes, the content of the other list updates, often with several hundred items. As I said before, one of the performance issues that I had, was the time it took to bind event listeners to all of those <span class="caps">DOM</span> elements for drag and drop. I solved this though event delegation. This change dramatically increased performance, but additional optimizations were still needed. Unfortunately, the issues were mostly beyond my control since the <span class="caps">DOM</span> was the source of the problem. Here is my original code.</p>
<pre style="clear:both;">$("#first-list li").live("mousedown", function() {
    $("#second-list").empty();

    $.each(content, function(i) {
        $("&lt;li&gt;").text(this.name).appendTo("#second-list");
    });
});</pre>
<p style="clear:both;">As this code shows, every time a user clicks on a list item in the first list, all of the items in the second list were removed using the jQuery.empty() function, and all of the items in the content array are appended to the second list.</p>
<p style="clear:both;">
<h2>So why is this slow?</h2>
<p style="clear:both;">This looks like pretty normal jQuery code and it works great until you have a lot of elements to append all at once. The reason that appending elements is slow, is because the browser must reflow the entire page every time an element is appended. Reflowing is the process that the browser’s layout manager goes through every time something changes size, or is added or removed from the page. During the process, the browser must recalculate the position and size of all of the elements on the page and then repaint it. Since reflowing occurs after appending each individual item to the <span class="caps"><span class="caps"><span class="caps"><span class="caps">DOM</span></span></span></span>, performance can really take a hit.</p>
<p style="clear:both;">
<h2>The solution</h2>
<p style="clear:both;">The solution to this problem is to force the browser to reflow only once, and an unfortunate side effect is less simple looking code.</p>
<pre style="clear:both;">$("#first-list li").live("mousedown", function(e) {
    var html = [],
        len = content.length,
        i = 0;

    for(var j=0; j&lt;len; j++) {
        html[i++] = "&lt;li&gt;";
        html[i++] = content[j].name;
        html[i++] = "&lt;/li&gt;";
    }

    $("#second-list").html("&lt;div&gt;" + html.join('') + "&lt;/div&gt;");
});</pre>
<p style="clear:both;">In this code, instead of using jQuery to create and append elements to the <span class="caps">DOM</span>, we actually create a long string of all of the elements that we want to append in memory, and then set it as the innerHTML of the second list. I have further optimized the code so that it actually creates an array of strings and then joins them, which is faster than doing string concatenation in most browsers. I have also wrapped all of the list items in a single <span class="caps">DIV</span>, which speeds up the browser because it can insert the elements as a block instead of individually.</p>
<p style="clear:both;">
<h2>So how does this perform?</h2>
<p style="clear:both;">Appending elements all at once performs much better than using jQuery to append the elements as they are being created, which would be expected. In my informal tests appending 500 elements, the grouped performance is often double the individual speed.</p>
<p style="clear:both;">
<h2>Conclusion</h2>
<p style="clear:both;">Performance is a very big issue if you are writing large scale applications, and it is unfortunate that the browser platform is slow in such a key area. That is why hacks like this exist: to artificially make things faster. It is my hope that browser makers will step up to the plate and make one of the most important parts of the browser faster for programmers, and most importantly for users. Until then however, we as developers need to get around these performance issues so that the experience that users have with web applications is a positive one. Performance is one of the final hurdles of browser based apps which I firmly believe are the future of computing.</p>
<p><br class="final-break" style="clear:both;" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/devongovett.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/devongovett.wordpress.com/149/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devongovett.wordpress.com&#038;blog=6814821&#038;post=149&#038;subd=devongovett&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devongovett.wordpress.com/2009/12/08/jquery-dom-manipulation-at-lighting-speeds/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75d72a45e763d7c4d2d645596f173de5?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">devongovett</media:title>
		</media:content>
	</item>
		<item>
		<title>Event Delegated Drag and Drop jQuery Plugin</title>
		<link>http://devongovett.wordpress.com/2009/12/01/event-delegated-drag-and-drop-jquery-plugin/</link>
		<comments>http://devongovett.wordpress.com/2009/12/01/event-delegated-drag-and-drop-jquery-plugin/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 04:30:12 +0000</pubDate>
		<dc:creator>devongovett</dc:creator>
				<category><![CDATA[Web development]]></category>
		<category><![CDATA[drag and drop]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://devongovett.wordpress.com/?p=123</guid>
		<description><![CDATA[JavaScript drag and drop is a difficult task to achieve, and luckily libraries such as jQuery UI help make the task easier. Unfortunately however, all of the drag and drop libraries that I found did not use event delegation. Event delegation is a technique used to make JavaScript libraries perform better by only registering one [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devongovett.wordpress.com&#038;blog=6814821&#038;post=123&#038;subd=devongovett&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="clear:both;">JavaScript drag and drop is a difficult task to achieve, and luckily libraries such as <a href="http://jqueryui.com/" target="_blank">jQuery UI</a> help make the task easier. Unfortunately however, all of the drag and drop libraries that I found did not use event delegation. Event delegation is a technique used to make JavaScript libraries perform better by only registering one event handler of each type for the whole document, rather than for each individual element. Besides providing pages with a speed boost, event delegation has the added benefit of working automatically on new elements added to the page. If, for instance, I had created a click handler on all of the DIVs when the page first loaded, and then added another DIV later using JavaScript, that new DIV would automatically respond to click events using the handler I had set up when the page was loaded since you don&#8217;t need to register a new event listener. Event delegation is a fairly complex issue, but it is easier than you might think. If you are interested in learning more about event delegation, you should check out <a href="http://www.sitepoint.com/blogs/2008/07/23/javascript-event-delegation-is-easier-than-you-think/" target="_blank">this Sitepoint article</a> on the topic.</p>
<p style="clear:both;">Recently, I was writing a pretty complex application using jQuery, and I was using jQuery UI to do the drag and drop. I had a fairly small test data set of 30 or 40 items, but when I was just about ready to go live and was testing the app with a larger data set of 500 &#8211; 600 items, things started performing very slowly. Every time a user clicked on an item in one list, all of the items in the second list needed to change, and because jQuery UI doesn&#8217;t use event delegation, things were taking a long time. It turns out that binding event listeners to 600 list items takes almost <em>2 seconds</em> on my system, and this was simply not acceptable for the application that I was building.</p>
<p style="clear:both;">I searched and searched, and could not find a drag and drop library similar to jQuery UI&#8217;s that used event delegation. So, long story short, I decided to write my own. Since I was writing this for a specific application, I only added the features that I was using from jQuery UI, but most of the function and property names are the same. It doesn&#8217;t nearly have all of the options that jQuery UI provides, but I can see it getting there in the future, as I need the features. Since writing a cross browser drag and drop library from scratch is not the most fun experience, I am posting this library to the web so that you can use it. If you&#8217;d like to add features, take a look at the source (it&#8217;s less than 200 lines!) and feel free to do so.</p>
<p style="clear:both;">
<h1>Examples:</h1>
</p>
<p style="clear:both;">This library is designed to be a drag AND drop library, meaning that elements that are dragged need to be dropped somewhere. This means that when you drop an element where it isn&#8217;t allowed to drop, the element will just slide back to it&#8217;s starting position. This isn&#8217;t a library for simply changing the position of elements at this point, but it could be in the future.</p>
<p style="clear:both;">To make an element draggable or droppable, you just call the respective method on any jQuery object. For example:</p>
<pre style="clear:both;">$(".draggable").draggable();
$(".droptarget").droppable();</pre>
<p style="clear:both;"> The options that you can use in the draggable plugin are in the table below.</p>
<p style="clear:both;">
<table border="1">
<tbody>
<tr>
<th>Name</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td>
<pre style="clear:both;">draggingClass</pre>
</td>
<td>The class that will be applied to helper elements while dragging</td>
<td>
<pre style="clear:both;text-align:center;">dragging</pre>
</td>
</tr>
<tr>
<td>
<pre style="clear:both;">helper</pre>
</td>
<td>A function that returns an element to be used as the dragging helper (the element shown to the user while dragging). A function is passed into the helper option allowing you to set an option temporarily (just for the current drag).</td>
<td style="text-align:center;">Clone draggable</td>
</tr>
<tr>
<td>
<pre style="clear:both;">distance</pre>
</td>
<td>The distance the user needs to drag from the draggable element before the helper element becomes visible.  Useful for elements that can be both clicked and dragged as this prevents drag operations until the user really wants to drag.</td>
<td>
<pre style="clear:both;text-align:center;">0</pre>
</td>
</tr>
<tr>
<td>
<pre style="clear:both;">cursorAt</pre>
</td>
<td>The position at which the mouse cursor will always appear during a drag.  Useful for helpers with a dramatically different size than the draggable element.  Pass in an object with optional properties <strong>top</strong> and <strong>left</strong> which are positions of the cursor relative to the helper element.</td>
<td style="text-align:center;">Mousedown position</td>
</tr>
</tbody>
</table>
<p style="clear:both;"><code></code><br />
The options for the droppable plugin are in the table below.</p>
<p style="clear:both;">
<table border="1">
<tbody>
<tr>
<th>Name</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td>
<pre style="clear:both;">hoverClass</pre>
</td>
<td>The class that will be applied to the drop target when an acceptable droppable is over the target.</td>
<td>
<pre style="clear:both;text-align:center;">draghovered</pre>
</td>
</tr>
<tr>
<td>
<pre style="clear:both;">accept</pre>
</td>
<td>A jQuery selector that describes the elements that may be dropped on the target</td>
<td style="text-align:center;">Any element</td>
</tr>
<tr>
<td>
<pre style="clear:both;">drop</pre>
</td>
<td>A function to be called when a drop event occurs.  An object will be passed into the function with some data about the drop, including: <strong>helper</strong>: the helper element, <strong>draggable</strong>: the draggable element, and <strong>position</strong>: the absolute position of the mouse cursor relative to the page when the drop occurred.</td>
<td style="text-align:center;">None</td>
</tr>
</tbody>
</table>
<p style="clear:both;"><code></code><br />
As I stated above, this is a preliminary release, and more options will be added in the future. <a href="http://dl.dropbox.com/u/534786/drag_and_drop.html" target="_blank">Here is a test page</a> showing some examples using the options above. As a side note, the time taken to run the code in my app is now just 20ms (down from 2 seconds), since the drag and drop code doesn&#8217;t even need to be run!</p>
<p style="clear:both;">You can download the jQuery plugin <a href="http://dl.dropbox.com/u/534786/jquery.draggable.js" target="_blank">here</a>. Have fun!</p>
<p><br class="final-break" style="clear:both;" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/devongovett.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/devongovett.wordpress.com/123/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devongovett.wordpress.com&#038;blog=6814821&#038;post=123&#038;subd=devongovett&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devongovett.wordpress.com/2009/12/01/event-delegated-drag-and-drop-jquery-plugin/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75d72a45e763d7c4d2d645596f173de5?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">devongovett</media:title>
		</media:content>
	</item>
		<item>
		<title>How to Achieve Cross-Browser @font-face Support</title>
		<link>http://devongovett.wordpress.com/2009/10/27/how-to-achieve-cross-browser-font-face-support/</link>
		<comments>http://devongovett.wordpress.com/2009/10/27/how-to-achieve-cross-browser-font-face-support/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 11:31:38 +0000</pubDate>
		<dc:creator>devongovett</dc:creator>
				<category><![CDATA[Web development]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[fonts]]></category>

		<guid isPermaLink="false">http://devongovett.wordpress.com/2009/10/27/how-to-achieve-cross-browser-font-face-support/</guid>
		<description><![CDATA[I recently had an article published over on the Themeforest blog about achieving cross browser @font-face support. Check it out at http://blog.themeforest.net/tutorials/how-to-achieve-cross-browser-font-face-support/<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devongovett.wordpress.com&#038;blog=6814821&#038;post=122&#038;subd=devongovett&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="clear:both;">I recently had an article published over on the Themeforest blog about achieving cross browser @font-face support. Check it out at <a href="http://en.support.wordpress.com/affiliate-links/">http://blog.themeforest.net/tutorials/how-to-achieve-cross-browser-font-face-support/</a></p>
<p><br class="final-break" style="clear:both;" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/devongovett.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/devongovett.wordpress.com/122/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devongovett.wordpress.com&#038;blog=6814821&#038;post=122&#038;subd=devongovett&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devongovett.wordpress.com/2009/10/27/how-to-achieve-cross-browser-font-face-support/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75d72a45e763d7c4d2d645596f173de5?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">devongovett</media:title>
		</media:content>
	</item>
		<item>
		<title>Quickly Make Any Page Print Nicely (with The Printliminator)</title>
		<link>http://devongovett.wordpress.com/2009/10/07/quickly-make-any-page-print-nicely-with-the-printliminator-css-tricks/</link>
		<comments>http://devongovett.wordpress.com/2009/10/07/quickly-make-any-page-print-nicely-with-the-printliminator-css-tricks/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 22:58:12 +0000</pubDate>
		<dc:creator>devongovett</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://devongovett.wordpress.com/?p=113</guid>
		<description><![CDATA[This is a repost from CSS-Tricks, where I have been working with Chris Coyier to create The Printliminator. I had this idea when I was at a lyrics site trying to print out some lyrics. The page didn’t have a good print stylesheet and was full of all kinds of crap. I copied the source [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devongovett.wordpress.com&#038;blog=6814821&#038;post=113&#038;subd=devongovett&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>This is a repost from <a href="http://css-tricks.com/">CSS-Tricks</a>, where I have been working with Chris Coyier to create <a href="http://css-tricks.com/examples/ThePrintliminator/">The Printliminator</a>.</p>
<blockquote><p>I had this idea when I was at a lyrics site trying to print out some lyrics. The page didn’t have a good print stylesheet and was full of all kinds of crap. I copied the source code and made a local version of the site and dumped some simple jQuery stuff in there to make it so any thing I clicked on was eliminated from the page. Turns out it’s the current version of the DOM that gets sent to the printer, so I could eliminate things at will and have them not print. Cool!</p>
<p>After the idea was in place, I went back and forth with Devon Govett turning it into a more full-featured bookmarklet. The current iteration has click-to-remove elements, with a really cool feature of option-clicking to remove everything except the selected element. There are more features, and I think the video explains it better than I can with words:</p>
<p><span style="display:block;width:425px;margin:0 auto;"> <embed src='http://widgets.vodpod.com/w/video_embed/ExternalVideo.881026' type='application/x-shockwave-flash' AllowScriptAccess='sameDomain' pluginspage='http://www.macromedia.com/go/getflashplayer' wmode='transparent' flashvars='' width='425' height='350' /> </span></p>
<p>To grab it, head over to the <a href="http://css-tricks.com/examples/ThePrintliminator/">demo page</a> and drag the bookmarklet link into your bookmarks bar. Click it on any page to activate.</p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/devongovett.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/devongovett.wordpress.com/113/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devongovett.wordpress.com&#038;blog=6814821&#038;post=113&#038;subd=devongovett&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devongovett.wordpress.com/2009/10/07/quickly-make-any-page-print-nicely-with-the-printliminator-css-tricks/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75d72a45e763d7c4d2d645596f173de5?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">devongovett</media:title>
		</media:content>
	</item>
		<item>
		<title>Using Yahoo Pipes, and YQL to Bypass RSS Landing Pages</title>
		<link>http://devongovett.wordpress.com/2009/07/29/using-yahoo-pipes-and-yql-to-bypass-rss-landing-pages/</link>
		<comments>http://devongovett.wordpress.com/2009/07/29/using-yahoo-pipes-and-yql-to-bypass-rss-landing-pages/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 20:51:26 +0000</pubDate>
		<dc:creator>devongovett</dc:creator>
				<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://devongovett.wordpress.com/?p=75</guid>
		<description><![CDATA[If you subscribe to a lot of RSS feeds, you know how annoying it is when the link from an article goes to a landing page where you have to click again to get to the real article.  I decided that I&#8217;d had enough of these feeds this morning, and I set out to &#8220;fix&#8221; [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devongovett.wordpress.com&#038;blog=6814821&#038;post=75&#038;subd=devongovett&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-76" title="DesignFloat" src="http://devongovett.files.wordpress.com/2009/07/10-useful-quality-design-resources-on-graphicriver-designfloat.png?w=510&#038;h=527" alt="DesignFloat" width="510" height="527" /></p>
<p><span style="font-family:Helvetica, 'Times New Roman', 'Bitstream Charter', Times, 0;line-height:normal;font-size:12px;">If you subscribe to a lot of RSS feeds, you know how annoying it is when the link from an article goes to a landing page where you have to click again to get to the real article.  I decided that I&#8217;d had enough of these feeds this morning, and I set out to &#8220;fix&#8221; them.  One way to do this, is with Yahoo Pipes.  Yahoo Pipes allows you to mash up feeds in different ways, and output a feed that you and others can subscribe to.</span></p>
<p style="font:12px Helvetica;min-height:14px;margin:0;">
<p style="font:12px Helvetica;margin:0;">Yahoo Pipes is a web app, and since it&#8217;s a Yahoo product, you&#8217;ll need to have a Yahoo account in order to save the Pipe.  Once you sign in, click the &#8220;Create a pipe&#8221; button.  Now, you&#8217;ll have a blank Pipe, to which you can add the various modules in the left-hand sidebar.</p>
<p style="font:12px Helvetica;margin:0;">
<p style="font:12px Helvetica;margin:0;">
<p style="font:12px Helvetica;margin:0;">
<p style="font:12px Helvetica;margin:0;">
<p style="font:12px Helvetica;margin:0;"><a href="http://devongovett.files.wordpress.com/2009/07/pipes-editing-pipe.png"><img class="alignnone size-full wp-image-77" title="Pipes- editing pipe" src="http://devongovett.files.wordpress.com/2009/07/pipes-editing-pipe.png?w=510&#038;h=403" alt="Pipes- editing pipe" width="510" height="403" /></a></p>
<p style="font:12px Helvetica;margin:0;">
<p style="font:12px Helvetica;margin:0;">
<p style="font:12px Helvetica;margin:0;">
<p style="font:12px Helvetica;margin:0;">First, we need an input feed.  I&#8217;m going to use the <a href="http://www.designfloat.com/rss.php">DesignFloat RSS feed</a>.  First, drag the Fetch Feed module from the Sources section onto the main area.  Enter the URL of the RSS feed into the URL field.  Next we&#8217;ll need the Loop module from the Operators section.  Drag the String Builder module from the String section inside the loop.  This is where we will be using YQL, or the Yahoo Query Language.  YQL is a powerful, SQL like language for querying for data within webpages.  We&#8217;ll need to load that landing page, and query the HTML on the page for the link to the real article.  In order to do this, we&#8217;ll be using a script posted on the YQL blog, which makes it possible to query HTML pages based on CSS selectors.  So, in our String Builder, enter the following command (press the + button for each new line):</p>
<p style="font:12px Helvetica;min-height:14px;margin:0;">
<p style="font:12px Arial;margin:0;"><span style="font:12px Helvetica;"><span style="white-space:pre;"> </span></span>use &#8216;<a href="http://yqlblog.net/samples/data.html.cssselect.xml&#038;#8217" rel="nofollow">http://yqlblog.net/samples/data.html.cssselect.xml&#038;#8217</a>; as data.html.cssselect;</p>
<p style="font:12px Arial;margin:0;"><span style="white-space:pre;"> </span>select * from data.html.cssselect where url=&#8221;</p>
<p style="font:12px Arial;margin:0;"><span style="white-space:pre;"> </span>item.link</p>
<p style="font:12px Arial;margin:0;"><span style="white-space:pre;"> </span>&#8221; and css=&#8221;.toptitle h1 a&#8221;</p>
<p style="font:12px Arial;min-height:14px;margin:0;">
<p style="font:12px Arial;margin:0;">If you are using a different feed, you&#8217;ll need a different CSS selector (in the last line).  I found mine by using Safari&#8217;s web inspector, but you could also use Firebug, or IE8&#8242;s new Developer Tools.</p>
<p style="font:12px Arial;margin:0;">
<p style="font:12px Arial;margin:0;">
<p style="font:12px Arial;margin:0;">
<p style="font:12px Arial;margin:0;"><a href="http://devongovett.files.wordpress.com/2009/07/picture-3.png"><img class="alignnone size-full wp-image-78" title="Picture 3" src="http://devongovett.files.wordpress.com/2009/07/picture-3.png?w=510&#038;h=345" alt="Picture 3" width="510" height="345" /></a></p>
<p style="font:12px Arial;margin:0;">
<p style="font:12px Arial;margin:0;">
<p style="font:12px Arial;margin:0;">
<p style="font:12px Helvetica;margin:0;">Then select &#8220;assign results to item.link&#8221; in the bottom of the Loop module.</p>
<p style="font:12px Helvetica;margin:0;">
<p style="font:12px Helvetica;margin:0;">
<p style="font:12px Helvetica;margin:0;">
<p style="font:12px Helvetica;margin:0;"><a href="http://devongovett.files.wordpress.com/2009/07/picture-4.png"><img class="alignnone size-full wp-image-79" title="Picture 4" src="http://devongovett.files.wordpress.com/2009/07/picture-4.png?w=510" alt="Picture 4"   /></a></p>
<p style="font:12px Helvetica;margin:0;">
<p style="font:12px Helvetica;margin:0;">
<p style="font:12px Helvetica;margin:0;">
<p style="font:12px Helvetica;margin:0;">Next, we&#8217;ll need another loop module, with a YQL query (in the Sources section) in order to actually run the YQL query.  For the query field, select item.link, and make sure that the Env URL field is blank.  Finally, select &#8220;assign first results to item.link&#8221; at the bottom of the loop module.</p>
<p style="font:12px Helvetica;margin:0;">
<p style="font:12px Helvetica;margin:0;">
<p style="font:12px Helvetica;margin:0;">
<p style="font:12px Helvetica;margin:0;"><a href="http://devongovett.files.wordpress.com/2009/07/picture-5.png"><img class="alignnone size-full wp-image-80" title="Picture 5" src="http://devongovett.files.wordpress.com/2009/07/picture-5.png?w=510" alt="Picture 5"   /></a></p>
<p style="font:12px Helvetica;margin:0;">
<p style="font:12px Helvetica;margin:0;">
<p style="font:12px Helvetica;margin:0;">
<p style="font:12px Helvetica;margin:0;">The last module that we need to add, is the Create RSS module.  All we need to do here, is set Link to item.link.a.href.  Finally, you just need to connect all of the modules, and save the feed.  If you click &#8220;Run Feed&#8221; at the top of the screen, you should see a nice feed which links to the original articles, rather than the landing page.</p>
<p style="font:12px Helvetica;margin:0;">
<p style="font:12px Helvetica;margin:0;">
<p style="font:12px Helvetica;margin:0;">
<p style="font:12px Helvetica;margin:0;"><a href="http://devongovett.files.wordpress.com/2009/07/pipes-editing-designfloat.png"><img class="alignnone size-full wp-image-81" title="Pipes- editing 'DesignFloat'" src="http://devongovett.files.wordpress.com/2009/07/pipes-editing-designfloat.png?w=510&#038;h=403" alt="Pipes- editing 'DesignFloat'" width="510" height="403" /></a></p>
<p style="font:12px Helvetica;margin:0;">
<p style="font:12px Helvetica;margin:0;">
<p style="font:12px Helvetica;margin:0;">
<p style="font:12px Helvetica;margin:0;">You can try out the feed that I created <a href="http://pipes.yahoo.com/pipes/pipe.info?_id=3r6P53V83hGD6TcOoRWqPg" target="_blank">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/devongovett.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/devongovett.wordpress.com/75/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devongovett.wordpress.com&#038;blog=6814821&#038;post=75&#038;subd=devongovett&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devongovett.wordpress.com/2009/07/29/using-yahoo-pipes-and-yql-to-bypass-rss-landing-pages/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75d72a45e763d7c4d2d645596f173de5?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">devongovett</media:title>
		</media:content>

		<media:content url="http://devongovett.files.wordpress.com/2009/07/10-useful-quality-design-resources-on-graphicriver-designfloat.png" medium="image">
			<media:title type="html">DesignFloat</media:title>
		</media:content>

		<media:content url="http://devongovett.files.wordpress.com/2009/07/pipes-editing-pipe.png" medium="image">
			<media:title type="html">Pipes- editing pipe</media:title>
		</media:content>

		<media:content url="http://devongovett.files.wordpress.com/2009/07/picture-3.png" medium="image">
			<media:title type="html">Picture 3</media:title>
		</media:content>

		<media:content url="http://devongovett.files.wordpress.com/2009/07/picture-4.png" medium="image">
			<media:title type="html">Picture 4</media:title>
		</media:content>

		<media:content url="http://devongovett.files.wordpress.com/2009/07/picture-5.png" medium="image">
			<media:title type="html">Picture 5</media:title>
		</media:content>

		<media:content url="http://devongovett.files.wordpress.com/2009/07/pipes-editing-designfloat.png" medium="image">
			<media:title type="html">Pipes- editing &#039;DesignFloat&#039;</media:title>
		</media:content>
	</item>
		<item>
		<title>Easily Run Multiple Firefox Instances on a Mac</title>
		<link>http://devongovett.wordpress.com/2009/04/14/multiple-firefox-mac/</link>
		<comments>http://devongovett.wordpress.com/2009/04/14/multiple-firefox-mac/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 00:29:58 +0000</pubDate>
		<dc:creator>devongovett</dc:creator>
				<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://devongovett.wordpress.com/?p=64</guid>
		<description><![CDATA[I came up with a little trick to run multiple instances of Firefox simultaneously on a Mac. The following assumes that the instance of Firefox that you want to set up, is located at /Applications/Firefox.app. Create a Profile First you must create a profile for your new instance of Firefox. In a Terminal window, enter [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devongovett.wordpress.com&#038;blog=6814821&#038;post=64&#038;subd=devongovett&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I came up with a little trick to run multiple instances of Firefox simultaneously on a Mac.  The following assumes that the instance of Firefox that you want to set up, is located at <code>/Applications/Firefox.app</code>.</p>
<h1>Create a Profile</h1>
<p>First you must create a profile for your new instance of Firefox.  In a Terminal window, enter the following command:</p>
<p><code>/path-to/Firefox.app/Contents/MacOS/firefox-bin -Profilemanager<br />
</code></p>
<p>This will open the profile manager.  Create a new profile for your new instance.  Name it something you can remember like &#8220;Firefox 2.&#8221;<br />
<img src="http://devongovett.files.wordpress.com/2009/04/profile.png?w=510" alt="Profile Manager" /></p>
<h1>Make it Auto-launch</h1>
<p>You could just uncheck the &#8220;Don&#8217;t ask at startup&#8221; option, and every time that you launched any version of Firefox, you would need to choose a profile that wasn&#8217;t already in use.  But, what we really want is to make them auto-launch.</p>
<p>Open up the Finder, and navigate to where the instance of Firefox that you want to set up is located.   Right-click the icon, and select &#8220;Show Package Contents&#8221; from the context menu.  In the resulting Finder window, navigate to <code>Contents/MacOS</code> and rename <code>firefox-bin</code> to <code>firefox-bin1</code>.</p>
<p>In your favorite text editor, create a new file and paste the following code into it.</p>
<p><code>/Applications/Firefox.app/Contents/MacOS/firefox-bin1 -P ProfileName &amp;</code></p>
<p>Change &#8220;ProfileName&#8221; to the name of the profile you created in the first step.</p>
<p>Save the file as <code>/</code><code>Applications</code><code>/Firefox.app/Contents/MacOS/firefox-bin</code> with no extension.  To make the file executable, run the following command in the Terminal:</p>
<p><code>chmod +x /</code><code>Applications</code><code>/Firefox.app/Contents/MacOS/firefox-bin</code></p>
<h1>Conclusion</h1>
<p>You should now be able to run multiple versions of Firefox simultaneously without choosing a profile.  <strong>Remember:</strong> You must set up a profile for each instance that you are going to run!</p>
<p>Happy browsing!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/devongovett.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/devongovett.wordpress.com/64/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devongovett.wordpress.com&#038;blog=6814821&#038;post=64&#038;subd=devongovett&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devongovett.wordpress.com/2009/04/14/multiple-firefox-mac/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75d72a45e763d7c4d2d645596f173de5?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">devongovett</media:title>
		</media:content>

		<media:content url="http://devongovett.files.wordpress.com/2009/04/profile.png" medium="image">
			<media:title type="html">Profile Manager</media:title>
		</media:content>
	</item>
		<item>
		<title>Text-overflow: ellipsis for Firefox via jQuery</title>
		<link>http://devongovett.wordpress.com/2009/04/06/text-overflow-ellipsis-for-firefox-via-jquery/</link>
		<comments>http://devongovett.wordpress.com/2009/04/06/text-overflow-ellipsis-for-firefox-via-jquery/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 23:57:25 +0000</pubDate>
		<dc:creator>devongovett</dc:creator>
				<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://devongovett.wordpress.com/?p=44</guid>
		<description><![CDATA[There are a few CSS features that Microsoft pioneered and has had available to developers in Internet Explorer for a long time now. One of those features is the text-overflow property, which is now in CSS3 and has implementations in Safari, and Opera. Firefox still does not support this feature, but I have heard that [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devongovett.wordpress.com&#038;blog=6814821&#038;post=44&#038;subd=devongovett&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>There are a few CSS features that Microsoft pioneered and has had available to developers in Internet Explorer for a long time now.  One of those features is the <code>text-overflow</code> property, which is now in CSS3 and has implementations in Safari, and Opera.  Firefox still does not support this feature, but I have heard that it will in Firefox 3.1.</p>
<p>Here is a rundown of what the property does.  When text overflows an element&#8217;s box, the <code>text-overflow</code> property helps leave a visual hint to the user that there is more text.  When a value of <code>ellipsis</code> is used, three dots will be shown before the text is clipped by <code>overflow: hidden</code>.</p>
<div id="test" style="border:1px solid black;width:14em;overflow:hidden;white-space:nowrap;">Lorem ipsum dolor sit amet, c&#8230;</div>
<p>I wanted to be able to use this feature in all browsers, so I wrote a small jQuery plugin in order to support Firefox.  You can download the plugin <a href="http://bit.ly/SRLg9">here</a>.  To use, just call <code>ellipsis()</code> on a jQuery object.  For example:</p>
<pre>$("span").ellipsis();</pre>
<p>There is one option available, which is simply a boolean specifying whether or not to update the text when the size of the element changes.  This is useful if the width of the element is a percent, or if you change it via javascript (although I wouldn&#8217;t recommend animation).</p>
<p>If you pass false or nothing at all, the text will remain static.  If you know that the width of the element will not be changing, <strong>do not</strong> pass true.  If you do, performance of the browser will decrease unnecessarily.</p>
<p>You can see a test page with the plugin <a href="http://bit.ly/5QIE7">here</a>.  The plugin will not do anything if you are not using Firefox.</p>
<p>If you are interested, take a look at the code.  If you have a better solution that I have overlooked, or you can make it faster please comment here to let me know!</p>
<p><strong>Update:</strong> Based on comments on <a href="http://ajaxian.com/archives/text-overflow-for-firefox-via-jquery" target="_blank">Ajaxian</a>, the plugin now no longer uses $.browser.mozilla, and instead uses feature testing.</p>
<p><strong>Update:</strong> Based on Jimmie&#8217;s <a href="http://devongovett.wordpress.com/2009/04/06/text-overflow-ellipsis-for-firefox-via-jquery/#comment-15">comment</a>, the plugin should now work correctly with different fonts.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/devongovett.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/devongovett.wordpress.com/44/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devongovett.wordpress.com&#038;blog=6814821&#038;post=44&#038;subd=devongovett&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devongovett.wordpress.com/2009/04/06/text-overflow-ellipsis-for-firefox-via-jquery/feed/</wfw:commentRss>
		<slash:comments>61</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75d72a45e763d7c4d2d645596f173de5?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">devongovett</media:title>
		</media:content>
	</item>
	</channel>
</rss>
