<?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>The 14 Days of jQuery &#187; Day One</title>
	<atom:link href="http://jquery14.com/category/day-01/feed" rel="self" type="application/rss+xml" />
	<link>http://jquery14.com</link>
	<description>jQuery 1.4 release</description>
	<lastBuildDate>Thu, 28 Jan 2010 06:03:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>jQuery 1.4 Released &#8211; Full Release Notes</title>
		<link>http://jquery14.com/day-01/jquery-14</link>
		<comments>http://jquery14.com/day-01/jquery-14#comments</comments>
		<pubDate>Thu, 14 Jan 2010 13:00:31 +0000</pubDate>
		<dc:creator>jdsharp</dc:creator>
				<category><![CDATA[Day One]]></category>

		<guid isPermaLink="false">http://jquery14.com/?p=60</guid>
		<description><![CDATA[14 Days of jQuery: 15 Days of Prizes. Submit your cool uses of jQuery, win a laptop and hosting!
In celebration of jQuery&#8217;s 4th birthday, the jQuery team is pleased to release the latest major release of the jQuery JavaScript library! A lot of coding, testing, and documenting has gone into this release, and we&#8217;re really [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; padding-left: 10px; font-size: 18px; width: 175px; background-color: #edede9;"><a href="http://mediatemple.net/jquery14/">14 Days of jQuery: 15 Days of Prizes</a>. Submit your cool uses of jQuery, win a laptop and hosting!</div>
<p>In celebration of jQuery&#8217;s 4th birthday, the jQuery team is pleased to release the latest major release of the jQuery JavaScript library! A lot of coding, testing, and documenting has gone into this release, and we&#8217;re really quite proud of it.</p>
<p>I want to personally thank Brandon Aaron, Ben Alman, Louis-Rémi Babe, Ariel Flesler, Paul Irish, Robert Katić, Yehuda Katz, Dave Methvin, Justin Meyer, Karl Swedberg, and Aaron Quint who put a lot of work into fixing bugs and getting the release out the door.</p>
<h3>Downloading</h3>
<p>As usual, we provide two copies of jQuery, one minified (we now use the <a href="http://code.google.com/closure/compiler/">Google Closure Compiler</a> as the default minifier) and one uncompressed (for debugging or reading).</p>
<p><strong>NOTE:</strong> <a href="http://jquery14.com/day-12/jquery-141-released">jQuery 1.4.1 has already been released.</a> Please use that instead of the 1.4 release.</p>
<ul>
<li><a href="http://code.jquery.com/jquery-1.4.min.js">jQuery Minified</a> (23kb <a href="http://www.julienlecomte.net/blog/2007/08/13/">Gzipped</a>)</li>
<li><a href="http://code.jquery.com/jquery-1.4.js">jQuery Regular</a> (154kb)</li>
</ul>
<p>Additionally, Google has <a href="http://code.google.com/apis/ajaxlibs/documentation/index.html">provided</a> us with a copy of jQuery hosted on their servers. This copy of jQuery is automatically minified and gzipped &#8211; and served from Google&#8217;s fast edge cache servers.</p>
<ul>
<li><a href="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js">http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js</a></li>
</ul>
<p>You can feel free to include the above URL directly into your site and you will get the full performance benefits of a quickly-loading jQuery.</p>
<p>With jQuery 1.4 we attempted to minimize any large upgrade hassles &#8211; maintaining the signatures of all public functions. That being said, please read through the <a href="#backwards">list of potentially-breaking changes</a> to be aware of what might cause problems in your applications.</p>
<h2>Features</h2>
<p>Below is an overview of all the changes and functionality added to jQuery 1.4. Additionally all of the changes have been documented in <a href="http://api.jquery.com/category/version/1.4/">the jQuery 1.4 docs</a>.</p>
<h3>Performance Overhaul of Popular Methods</h3>
<p>Many of the most popular and commonly used jQuery methods have seen a significant rewrite in jQuery 1.4. When analyzing the code base we found that we were able to make some significant performance gains by comparing jQuery against itself: Seeing how many internal function calls were being made and to work to <a href="http://ejohn.org/blog/function-call-profiling/">reduce the complexity</a> of the code base.</p>
<p><a title="# of Function Calls for Popular jQuery Methods by John Resig, on Flickr" href="http://www.flickr.com/photos/jeresig/4271690739/"><img src="http://farm5.static.flickr.com/4008/4271690739_f0bced3a78.jpg" alt="# of Function Calls for Popular jQuery Methods" width="500" height="375" /></a><br />
<small><a title="# of Function Calls for Popular jQuery Methods by John Resig, on Flickr" href="http://www.flickr.com/photos/jeresig/4271691293/">View the cropped chart.</a></small></p>
<p>In jQuery 1.4 we&#8217;ve significantly reduced the complexity of the most popular methods in jQuery. The full performance details can be found below.</p>
<h3>Easy Setter Functions</h3>
<p>For a while now, you&#8217;ve been able to pass a function into <code><a href="http://api.jquery.com/attr">.attr()</a></code> and the return value of that function is set into the appropriate attribute. This functionalilty has now been extended into all setter methods: <code><a href="http://api.jquery.com/css">.css()</a></code>, <code><a href="http://api.jquery.com/attr">.attr()</a></code>, <code><a href="http://api.jquery.com/val">.val()</a></code>, <code><a href="http://api.jquery.com/html">.html()</a></code>, <code><a href="http://api.jquery.com/text">.text()</a></code>, <code><a href="http://api.jquery.com/append">.append()</a></code>, <code><a href="http://api.jquery.com/prepend">.prepend()</a></code>,  <code><a href="http://api.jquery.com/before">.before()</a></code>, <code><a href="http://api.jquery.com/after">.after()</a></code>, <code><a href="http://api.jquery.com/replaceWith">.replaceWith()</a></code>, <code><a href="http://api.jquery.com/wrap">.wrap()</a></code>, <code><a href="http://api.jquery.com/wrapInner">.wrapInner()</a></code>, <code><a href="http://api.jquery.com/offset">.offset()</a></code>, <code><a href="http://api.jquery.com/addClass">.addClass()</a></code>, <code><a href="http://api.jquery.com/removeClass">.removeClass()</a></code>, and <code><a href="http://api.jquery.com/toggleClass">.toggleClass()</a></code>.</p>
<p>Addtionally, for the following options, the current value of the item is passed into the function as the second argument: <code><a href="http://api.jquery.com/css">.css()</a></code>, <code><a href="http://api.jquery.com/attr">.attr()</a></code>, <code><a href="http://api.jquery.com/val">.val()</a></code>, <code><a href="http://api.jquery.com/html">.html()</a></code>, <code><a href="http://api.jquery.com/text">.text()</a></code>, <code><a href="http://api.jquery.com/append">.append()</a></code>, <code><a href="http://api.jquery.com/prepend">.prepend()</a></code>, <code><a href="http://api.jquery.com/offset">.offset()</a></code>, <code><a href="http://api.jquery.com/addClass">.addClass()</a></code>, <code><a href="http://api.jquery.com/removeClass">.removeClass()</a></code>, and <code><a href="http://api.jquery.com/toggleClass">.toggleClass()</a></code>.</p>
<p>This enables code like:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// find all ampersands in A's and wrap with a span</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'a'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span>html<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">return</span> html.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/&amp;amp;/gi</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'&lt;span class=&quot;amp&quot;&gt;&amp;amp;&lt;/span&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// Add some information to the title of the anchors</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'a[target]'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;title&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span>title<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">return</span> title <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; (Opens in External Window)&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3>Ajax</h3>
<p><strong>Nested param serialization</strong> (<a href="http://api.jquery.com/jQuery.param/">jQuery.param() Documentation</a>, <a href="http://github.com/jquery/jquery/commit/50d78e7658382d2a2f5149cae7a6572f78ce403f">Commit 1</a>, <a href="http://github.com/jquery/jquery/commit/67089eedf6f84acd9c16ea2a6dadadf7b13a7c84">Commit 2</a>)</p>
<p>jQuery 1.4 adds support for nested param serialization in jQuery.param, using the approach popularized by PHP, and supported by Ruby on Rails. For instance, <code>{foo: ["bar", "baz"]}</code> will be serialized as &#8220;foo[]=bar&amp;foo[]=baz&#8221;.</p>
<p>In jQuery 1.3, <code>{foo: ["bar", "baz"]}</code> was serialized as &#8220;foo=bar&amp;foo=baz&#8221;. However, there was no way to encode a single-element Array using this approach. If you need the old behavior, you can turn it back on by setting the traditional Ajax setting (globally via <code>jQuery.ajaxSettings.traditional</code> or on a case-by-case basis via the traditional flag).</p>
<p>There are three ways to enable the traditional way of serialization:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// Enables for all serialization</span>
jQuery.<span style="color: #660066;">ajaxSettings</span>.<span style="color: #660066;">traditional</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// Enables for a single serialization</span>
jQuery.<span style="color: #660066;">param</span><span style="color: #009900;">&#40;</span> stuff<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// Enables for a single Ajax requeset</span>
$.<span style="color: #660066;">ajax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span> data<span style="color: #339933;">:</span> stuff<span style="color: #339933;">,</span> traditional<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span> <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>More information: <a href="http://api.jquery.com/jQuery.param/">jQuery.param() Documentation</a>, <a href="http://api.jquery.com/jQuery.ajax/">jQuery.ajax() Documentation</a>, <a href="http://github.com/jquery/jquery/commit/39518945047413f1185682078043e70e0c5c9091">Commit</a>, <a href="http://github.com/jquery/jquery/blob/master/src/ajax.js#L175">Code</a></p>
<p><strong>JSON and script types auto-detected by content-type</strong> (<a href="http://api.jquery.com/jQuery.ajax/">jQuery.ajax Documentation</a>, <a href="http://github.com/jquery/jquery/commit/787f271052220c20787104f0eba6441aedac22ff">Commit 1</a>, <a href="http://github.com/jquery/jquery/commit/6861b5d4eb16222ed5ea623af6ce75362b55d1d4">Commit 2</a>)</p>
<p>If the response to an Ajax request is returned with a JSON mime type (application/json), the dataType defaults to &#8220;json&#8221; (if no dataType is specified). Additionally, if the response to an Ajax request is returned with a JavaScript mime type (text/javascript or application/x-javascript) , the dataType defaults to &#8220;script&#8221; (if no dataType is specified), causing the script to automatically execute.</p>
<p><strong>Etag support has been added</strong> (<a href="http://api.jquery.com/jQuery.ajax/">jQuery.ajax() Documentation</a>, <a href="http://github.com/jquery/jquery/commit/28ab4d32247943e1ae3409b23fe69303df0bc9eb">Commit</a>)</p>
<p>By default, jQuery ignores the Last-Modified header for Ajax requests, preferring to make request and ignore the browser cache. Specifying ifModified: true causes jQuery to use the browser cache if available. jQuery 1.4 will also send the If-None-Match header (for ETag support) if you specify ifModified.</p>
<p><strong>Strict JSON parsing, using native JSON.parse</strong> (<a href="http://api.jquery.com/jQuery.ajax/">jQuery.ajax() Documentation</a>, <a href="http://github.com/jquery/jquery/commit/90a87c03b4943d75c24bc5e6246630231d12d933">Commit 1</a>, <a href="http://github.com/jquery/jquery/commit/308d6cdad023da190ace2a698ee4815ed8dad9c5">Commit 2</a>, <a href="http://github.com/jquery/jquery/commit/44e6beb10304789044de2c5a58f5bb82e8321636">Commit 3</a>)</p>
<p>jQuery 1.3 and earlier used JavaScript&#8217;s <code>eval</code> to evaluate incoming JSON. jQuery 1.4 uses the native JSON parser if available. It also validates incoming JSON for validity, so malformed JSON (for instance <code>{foo: "bar"}</code>) will be rejected by jQuery in <a href="http://api.jquery.com/jQuery.getJSON">jQuery.getJSON</a> and when specifying &#8220;json&#8221; as the dataType of an Ajax request.</p>
<p><strong>Serialize HTML5 elements</strong> (<a href="http://api.jquery.com/jQuery.param/">jQuery.param() Documentation</a>, <a href="http://github.com/jquery/jquery/commit/b31b9bd756a1489c3b1b856ed8b624c55da9e02f">Commit</a>)</p>
<p>The new <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#attr-input-type-keywords">HTML5 input types</a> (such as `datetime` and `range`) will be included when you <code><a href="http://api.jquery.com/serialize">.serialize()</a></code> a form.</p>
<p><strong>Context for Ajax Request</strong> (<a href="http://api.jquery.com/jQuery.ajax/">jQuery.ajax() Documentation</a>, <a href="http://github.com/jquery/jquery/commit/183f37e4b4128af7ba096ac40046768b84b6d66e">Commit</a>)</p>
<p>You can now specify a context for an Ajax request, and all callbacks will have that context set (allowing you to simplify your code and possibly avoid having to use closures, or use other objects).</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">jQuery.<span style="color: #660066;">ajax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
    url<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;test.html&quot;</span><span style="color: #339933;">,</span>
    context<span style="color: #339933;">:</span> document.<span style="color: #660066;">body</span><span style="color: #339933;">,</span>
    success<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        jQuery<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;done&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>Success callback receives XHR object as third argument</strong> (<a href="http://api.jquery.com/jQuery.ajax/">jQuery.ajax() Documentation</a>, <a href="http://github.com/jquery/jquery/commit/c2101245c07afdb831b0c79869c7263420407b67">Commit</a>)</p>
<p>The success callback for any ajax request now receives the XMLHttpRequest object as the third argument. Previously this XHR object was only accessible as the return value for <code>$.ajax</code> and the like.</p>
<p><strong>Explicitly set a content-type</strong> (<a href="http://api.jquery.com/jQuery.ajax/">jQuery.ajax() Documentation</a>, <a href="http://github.com/jquery/jquery/commit/25b0ba9f9612583033b902a0e40345463a3a71d0">Commit</a>)</p>
<p>In jQuery 1.3, the contentType setting was ignored in <a href="http://api.jquery.com/jQuery.ajax/">jQuery.ajax</a> if no data was sent. In jQuery 1.4, the contentType is always sent. This fixes an issue with some backends that used the Content-Type header to decide what kind of response to send.</p>
<p><strong>Explicitly specify a JSONP callback name</strong> (<a href="http://api.jquery.com/jQuery.ajax/">jQuery.ajax Documentation</a>,  <a href="http://github.com/jquery/jquery/commit/fbc73d45b487dd863886c7fd3f0af1fd4dec261b">Commit</a>)</p>
<p>You can now specify the name of the JSONP callback in <a href="http://api.jquery.com/jQuery.ajax/">jQuery.ajax()</a> using the jsonpCallback option.</p>
<p><strong>Avoid pre-flighting cross-domain XHR</strong> (<a href="http://github.com/jquery/jquery/commit/a7678267d848fcef8775c8b9f4fa3e507b8cc5f4">Commit</a>)</p>
<p>Cross-domain ajax (for the browsers that support it) is smoother with jQuery as preflighting is avoided by default.</p>
<p><strong>jQuery.ajax() is now using onreadystatechange instead of a timer</strong> (<a href="http://github.com/jquery/jquery/commit/fe6c86d53046b0f4d648f61c0b8e75387af65152">Commit</a>)</p>
<p>Ajax requests should now take fewer resources by using onreadystatechange instead of polling.</p>
<h3>Attributes</h3>
<p><strong>The performance of <code>.css()</code> and  <code>.attr() </code> has been improved.</strong></p>
<p><a title="Performance of .css() and .attr() by John Resig, on Flickr" href="http://www.flickr.com/photos/jeresig/4271691147/"><img src="http://farm5.static.flickr.com/4026/4271691147_fd72853fa4.jpg" alt="Performance of .css() and .attr()" width="500" height="375" /></a></p>
<p><strong>The <code>.attr()</code> takes a function setter</strong> (<a href="http://api.jquery.com/attr/">.attr() Documentation</a>)</p>
<p>Not only can you use a function with <code>.attr()</code>, but you can also use the current value of the attribute with the function.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;img src=&quot;enter.png&quot; alt=&quot;enter your name&quot; /&gt;'</span><span style="color: #009900;">&#41;</span>
.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;alt&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>index<span style="color: #339933;">,</span> value<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">&quot;Please, &quot;</span> <span style="color: #339933;">+</span> value<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>.val( Function )</strong> (<a href="http://api.jquery.com/val/">.val() Documentation</a>)</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;food&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;food&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;input:text.food&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&amp;lt;ul class='sortable'&amp;gt;
&nbsp;
	&lt;li&gt;Peanut Butter&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Jelly&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&quot;</span><span style="color: #009900;">&#41;</span>
  .<span style="color: #660066;">sortable</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
  .<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;endsort&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;:text.food&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000066; font-weight: bold;">return</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;ul.sortable li:eq(&quot;</span> <span style="color: #339933;">+</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;data-index&quot;</span><span style="color: #009900;">&#41;</span>  <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;)&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;&lt;/</span>li<span style="color: #339933;">&gt;</span></pre></div></div>

<p><strong>.text() works on text and CDATA nodes</strong> (<a href="http://api.jquery.com/text/">.text() Documentation</a>, <a href="http://github.com/jquery/jquery/commit/b30af34f28074b491929445f5aad3d62c63e772f">Commit</a>)</p>
<h3>Core</h3>
<p><strong>Quick Element Construction</strong> (<a href="http://api.jquery.com/jQuery/#jQuery2">jQuery() Documentation</a>, <a href="http://github.com/jquery/jquery/commit/d40083c866738727aa7ffd7f13d2955bc9575d5e">Commit</a>)</p>
<p>When you create a single element with the jQuery function, you can now pass in an object to add attributes and events at the same time:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;
&nbsp;
&lt;div&gt;&quot;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>
    id<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;foo&quot;</span><span style="color: #339933;">,</span>
    css<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
        height<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;50px&quot;</span><span style="color: #339933;">,</span>
        width<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;50px&quot;</span><span style="color: #339933;">,</span>
        color<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;blue&quot;</span><span style="color: #339933;">,</span>
        backgroundColor<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;#ccc&quot;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    click<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
       $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;backgroundColor&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;red&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">appendTo</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;body&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;&lt;/</span>div<span style="color: #339933;">&gt;</span></pre></div></div>

<p>The keys of the object are functions that will be called with each value passed as an argument.</p>
<p><strong>.eq(-N), .get(-N)</strong> (<a href="http://api.jquery.com/eq/">.eq() Documentation</a>, <a href="http://api.jquery.com/get/">.get() Documentation</a>, <a href="http://github.com/jquery/jquery/commit/e532dfe5228217f55a33122a4438fd70522dbb4b">Commit</a>)</p>
<p>You can now pass in negative numbers for .get() and .eq(). For example, you can select the second-to-last div or, you can access the DOM element for the same:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;div&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">eq</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;div&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>New .first() and .last() methods</strong> (<a href="http://api.jquery.com/first/">.first() Documentation</a>, <a href="http://api.jquery.com/last/">.last() Documentation</a>, <a href="http://github.com/jquery/jquery/commit/9de120e6d7cfffa3d990a6ccf23db3cd74e2bdc0">Commit</a>)</p>
<p>For convenience, <code>.first()</code> and <code>.last()</code> are aliases of <a href="http://api.jquery.com/eq/">.eq(0)</a> and <a href="http://api.jquery.com/eq/">.eq(-1)</a>.</p>
<p><strong>New .toArray() method</strong> (<a href="http://api.jquery.com/toArray/">.toArray() Documentation</a>, <a href="http://github.com/jquery/jquery/commit/e124fec5e9cfee77cb23b27c0d43dc2631c83aab">Commit</a>)</p>
<p><a href="http://api.jquery.com/get">.get()</a> has historically returned an Array from the jQuery set. For further clarity, you can use <a href="http://api.jquery.com/toArray/">.toArray()</a> to achieve the same thing in jQuery 1.4. Unlike, .get(), however, .toArray() does not take an argument.</p>
<p><strong>jQuery() returns empty set</strong> (<a href="http://api.jquery.com/jQuery/">jQuery() Documentation</a>, <a href="http://github.com/jquery/jquery/commit/04524287d3e0112deae570ff9247c734833431bb">Commit</a>)</p>
<p>In jQuery 1.3, <a href="http://api.jquery.com/jQuery/">jQuery()</a> returned a jQuery set containing just the document. in jQuery 1.4, it returns an empty jQuery set. This can be useful for creating an empty set and adding elements to it dynamically. Note: The <code>jQuery().ready()</code> technique still works in 1.4 but it has been deprecated. Please use either <code>jQuery(document).ready()</code> or <code>jQuery(function(){})</code>.</p>
<p><strong>jQuery(&#8220;TAG&#8221;)</strong> (<a href="http://api.jquery.com/element-selector/">Element Selector Documentation</a>, <a href="http://github.com/jquery/jquery/commit/4ea4fad0902839c06c281b5de7b0aca29922b63d">Commit</a>)</p>
<p>A faster path is used when passing in a single tag name.</p>
<p><strong>jQuery(&#8220;&lt;div&gt;&#8221;) jQuery(&#8220;&lt;div/&gt;&#8221;) and jQuery(&#8220;&lt;div&gt;&lt;/div&gt;&#8221;)</strong> (<a href="http://api.jquery.com/jQuery/#jQuery2">jQuery() Documentation</a>, <a href="http://github.com/jquery/jquery/commit/c4c820efff4fa7bcce0d5bf0a448625278ea6379">Commit</a>)</p>
<p>All three now use the same code path (using document.createElement), improving performance for <code>jQuery("&lt;div&gt;&lt;/div&gt;")</code>. Note that if you specify attributes, we use the browser&#8217;s native parsing (using innerHTML).</p>
<h3>CSS</h3>
<p><strong>The performance of the .css() method has seen a 2x performance improvement.</strong></p>
<p><a title="Performance of .css() by John Resig, on Flickr" href="http://www.flickr.com/photos/jeresig/4271691599/"><img src="http://farm5.static.flickr.com/4055/4271691599_8a2f2e0624.jpg" alt="Performance of .css()" width="500" height="375" /></a></p>
<p><strong>The performance of the <code>.addClass()</code>, <code>.removeClass()</code>, and <code>.hasClass()</code> methods has seen a 3x performance improvement.</strong></p>
<p><a title="Performance of addClass, removeClass, and hasClass by John Resig, on Flickr" href="http://www.flickr.com/photos/jeresig/4272434054/"><img src="http://farm5.static.flickr.com/4040/4272434054_819d8f9e19.jpg" alt="Performance of addClass, removeClass, and hasClass" width="500" height="375" /></a></p>
<p><strong>.toggleClass() can toggle multiple classes</strong> (<a href="http://api.jquery.com/toggleClass/">.toggleClass() Documentation</a>, <a href="http://github.com/jquery/jquery/commit/5e6e53835e552920db4f88ac0c9eca71aaacbef0">Commit</a>)</p>
<p>You can now call <a href="http://api.jquery.com/toggleClass/">.toggleClass()</a> with multiple selectors and they will all be toggled.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;div&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toggleClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;current active&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3>Data</h3>
<p><strong>.data() returns Object and .data(Object) sets the object</strong> (<a href="http://api.jquery.com/data/">.data() Documentation</a>, <a href="http://github.com/jquery/jquery/commit/d36d224cc52e70d837306d33a03f517ef72abc60">Commit 1</a>, <a href="http://github.com/jquery/jquery/commit/f6a0bf6816f4e2e67382b1b13fdd3ff2ea4b22f8">Commit 2</a>)</p>
<p>It is sometimes desirable to work with the data attached to an element as a complete object. A common example would be wanting to copy the entire data from one element to another. In jQuery 1.4, <a href="http://api.jquery.com/data/">.data()</a> with no parameter returns the entire object, and <a href="http://api.jquery.com/data/">.data(Object)</a> sets the object. Keep in mind that this object includes events bound to the element, so use caution.</p>
<p><strong>Data cache is no longer created if it isn&#8217;t needed</strong> (<a href="http://github.com/jquery/jquery/commit/c4f144eeffd94c745839b0ced2de9c62cfa9f075">Commit 1</a>, <a href="http://github.com/jquery/jquery/commit/97e134fe80a734b97170bf43c9459511f4e165c7">Commit 2</a>, <a href="http://github.com/jquery/jquery/commit/67d445a703491c90a7d3c46be34bcdceb4d1c896">Commit 3</a>)</p>
<p>jQuery uses a unique expando on DOM elements that is used to get the <a href="http://api.jquery.com/data/">.data()</a> for a particular element. jQuery now avoids creating that expando when data is looked up but no data has been added. This potentially increases performance and avoids polluting the DOM in these cases.</p>
<h3>Effects</h3>
<p><strong>Per-property Easing</strong> (<a href="http://api.jquery.com/animate/#per-property-easing">Per-property Easing Documentation</a>, <a href="http://github.com/jquery/jquery/commit/93fdbeb963a9c350f807818c7cc99982942a92f3">Commit</a>)</p>
<p>In addition to being able to specify an easing function for an animation you can now specify an easing animation for individual properties. James Padolsey has more information and demos in <a href="http://james.padolsey.com/javascript/easing-in-jquery-1-4a2/">his blog post</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#clickme&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;div&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
    width<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;+=200px&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;swing&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
    height<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;+=50px&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;linear&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
  <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">2000</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">after</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;
&nbsp;
&lt;div&gt;Animation complete.&lt;/div&gt;
&nbsp;
&nbsp;
&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3>Events</h3>
<p><strong>New Method: jQuery.proxy()</strong> (<a href="http://api.jquery.com/jQuery.proxy/">jQuery.proxy() Documenation</a>, <a href="http://github.com/jquery/jquery/commit/66975de2d249643779e2b3daad0457f7f5f92508">Commit 1</a>, <a href="http://github.com/jquery/jquery/commit/1d2b1a57dae0b73b3d99197f73f4edb623b5574a">Commit 2</a>)</p>
<p>If you want to ensure that &#8220;this&#8221; inside a function will be permanently bound to a particular value, you can use jQuery.proxy to return a new function with that scope.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> obj <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000066;">name</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;John&quot;</span><span style="color: #339933;">,</span>
  test<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #000066;">name</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#test&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">unbind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;click&quot;</span><span style="color: #339933;">,</span> obj.<span style="color: #660066;">test</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#test&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span> jQuery.<span style="color: #660066;">proxy</span><span style="color: #009900;">&#40;</span> obj<span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;test&quot;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>Event Multi-binding</strong> (<a href="http://api.jquery.com/bind">.bind() Documentation</a>)</p>
<p>You can now pass an object of many events to bind to an element.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;div.test&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
  click<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;active&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
  mouseenter<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;inside&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
  mouseleave<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;inside&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>`change` and `submit` events normalized</strong> (<a href="http://api.jquery.com/change">Change Documentation</a>, <a href="http://api.jquery.com/submit">Submit Documentation</a>)</p>
<p>The change and submit events work reliably across browsers for both normal and live events. We override the normal change and submit events in Internet Explorer and replace them with events that work identically to the other browsers.</p>
<p><strong>New events: `focusin` and `focusout`</strong> (<a href="http://api.jquery.com/focusin/">.focusin() Documentation</a>, <a href="http://api.jquery.com/focusout/">.focusout() Documentation</a>, <a href="http://github.com/jquery/jquery/commit/03481a52c72e417b01cfeb499f26738cf5ed5839">Commit</a>)</p>
<p><code>focusin</code> and <code>focusout</code> are generally equivalent to <code>focus</code> and <code>blur</code> but bubble, which helps tremendously if you are writing your own event delegation behavior. Please note that `focus` and `blur` will not work with the live() method; this was a design decision due to the <a href="http://www.w3.org/TR/DOM-Level-2-Events/events.html">DOM Events spec</a> defining focus/blur do not bubble.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;form&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">focusout</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>event<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> tgt <span style="color: #339933;">=</span> event.<span style="color: #660066;">target</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>tgt.<span style="color: #660066;">nodeName</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;INPUT&quot;</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> <span style="color: #339933;">!</span>tgt.<span style="color: #660066;">value</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        $<span style="color: #009900;">&#40;</span>tgt<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">after</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&lt;span&gt;nothing here&lt;/span&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>All Events Can Be Live Events</strong> (<a href="http://api.jquery.com/live">.live() Documentation</a>)</p>
<p>With the exception of <a href="http://api.jquery.com/ready">ready</a>, <a href="http://api.jquery.com/focus">focus</a> (use focusin instead), and <a href="http://api.jquery.com/blur">blur</a> (use focusout instead), all events that can be bound using .bind() can also be live events.</p>
<p>We&#8217;re very proud to count some addtional events amongst those supported by <code>live()</code>. 1.4 introduces cross-browser support for<br />
<code>change</code>, <code>submit</code>, <code>focusin</code>, <code>focusout</code>, <code>mouseenter</code>, and <code>mouseleave</code> via the event delegation in <code>.live()</code>.</p>
<p>Note that if you need a live focus event, you should use focusin and focusout rather than focus and blur, because, as mentioned, focus and blur do not bubble.</p>
<p>Also, <code>live()</code> also now accepts a data object, just as <code>bind()</code> has. (<a href="http://github.com/jquery/jquery/commit/71efbdd3b26f3a283f8d4bfdcc7b6343142027b9">Commit</a>)</p>
<p><strong>live/die now work with context</strong> (<a href="http://github.com/jquery/jquery/commit/30e760b63fd6d82f30833cd2864f245dd9594cd9">Commit</a>)</p>
<p>You can now specify a context to the selector that will be used to bind a live event. If you do, only elements under that context will be bound. While the elements themselves do not need to exist when you create the live event, the context must exist.</p>
<p><strong>Make sure ready event has body at least</strong> (<a href="http://github.com/jquery/jquery/commit/262fcf7b7b919da1564509f621cf7480a5d5572b">Commit</a>)</p>
<p>jQuery now checks to see whether the body exists, and falls back to polling for the body if it does not.</p>
<p><strong>Unload is sped up in non-IE browsers that don&#8217;t need memory leak hand-holding.</strong> (<a href="http://github.com/jquery/jquery/commit/f3474c00cd6d9e5fd61b6ef1562003e9986ad67d">Commit</a>)</p>
<h3>Manipulation</h3>
<p>A number of DOM manipulation methods have seen dramatic overhauls in performance in jQuery 1.4.</p>
<p><strong>Performance of <a href="http://api.jquery.com/append">.append()</a>, <a href="http://api.jquery.com/prepend">.prepend()</a>, <a href="http://api.jquery.com/before">.before()</a>, and <a href="http://api.jquery.com/after">.after()</a> has been improved.</strong></p>
<p><a title="Performance of DOM Insertion by John Resig, on Flickr" href="http://www.flickr.com/photos/jeresig/4271691471/"><img src="http://farm5.static.flickr.com/4029/4271691471_1240afd5af.jpg" alt="Performance of DOM Insertion" width="500" height="375" /></a></p>
<p><strong>Performance of <a href="http://api.jquery.com/html">.html()</a> has been improved by nearly 3x.</strong></p>
<p><a title="Performance of .html() by John Resig, on Flickr" href="http://www.flickr.com/photos/jeresig/4271691747/"><img src="http://farm5.static.flickr.com/4037/4271691747_0cce01a33d.jpg" alt="Performance of .html()" width="500" height="375" /></a></p>
<p><strong>Performance of .remove() and .empty() has seen over a 4x speed increase.</strong></p>
<p><a title="Performance of .remove() and .empty() by John Resig, on Flickr" href="http://www.flickr.com/photos/jeresig/4271690883/"><img src="http://farm3.static.flickr.com/2693/4271690883_3224979b9b.jpg" alt="Performance of .remove() and .empty()" width="500" height="375" /></a></p>
<p><strong>New Method: .detach()</strong> (<a href="http://api.jquery.com/detach/">.detach() Documentation</a>, <a href="http://github.com/jquery/jquery/commit/7a67f8897d3c2ed97254f0fdb969be14e77962d1">Commit</a>)</p>
<p><code>detach()</code> removes an element from the DOM but does not remove the associated event handlers. This is appropriate for temporarily removing an element to manipulate and then return.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> foo <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#foo&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #006600; font-style: italic;">// do something</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
foo.<span style="color: #660066;">detach</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// foo retains event handlers</span>
foo.<span style="color: #660066;">appendTo</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;body&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>New unwrap() method</strong> (<a href="http://api.jquery.com/unwrap/">documentation</a>, <a href="http://github.com/jquery/jquery/commit/69e6e53555f21f07b534f1169298f7b33011bb4b">commit</a>)</p>
<p>The new unwrap method will take the children of a given parent and replace said parent with them. Like so:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
annie
&nbsp;
davey
&nbsp;
stevie<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'div'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">unwrap</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">&nbsp;
annie
&nbsp;
davey
&nbsp;
stevie</pre></div></div>

<p><strong>Caching in domManip</strong> (<a href="http://github.com/jquery/jquery/commit/8db967e9d52407c8e76d81b9d472800667f6fa29">commit</a>)</p>
<p>jQuery caches the resulting nodes created using methods like <code>jQuery("&lt;div&gt;")</code> and <code>.after("&lt;div&gt;")</code>. This results in significantly faster performance on pages that do DOM manipulation with strings using these methods.</p>
<p><strong>before, after, replaceWith on disconnected nodes</strong> (<a href="http://github.com/jquery/jquery/commit/173c1477ae6efc4c2eeb7131ba0646c4e1323975">commit</a>)</p>
<p>You can now use before, after, and replaceWith on nodes that are not attached to the DOM. This allows you to do more complex manipulations before inserting the final structure into the DOM. This also prevents reflows from occuring while the manipulation is taking place.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;
&nbsp;
&lt;div&gt;&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">before</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;
&nbsp;
Hello
&nbsp;
&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">appendTo</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;body&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span></pre></div></div>

<p><strong>.clone(true) also clones data</strong> (<a href="http://api.jquery.com/clone/">documentation</a>, <a href="http://github.com/jquery/jquery/commit/4b70f006f579fba24a882d80ca67f1971dbb4922">commit</a>)</p>
<p>In jQuery 1.3, .clone(true) did a deep clone, but did not clone data. In jQuery 1.4, it clones data, which means that events are cloned as well. This uses the same semantics as jQuery.extend, so plain objects and Arrays are cloned, while custom objects are not.</p>
<h3>Offset</h3>
<p><strong>.offset( coords | Function )</strong> (<a href="http://api.jquery.com/offset/">.offset() documentation</a>, <a href="http://github.com/jquery/jquery/commit/daffb954e397bd5d9f8e9aaedab6c0baa9609e1e">commit</a>)</p>
<p>It is now possible to set the offset of an element. Offset, like all setter methods, can now also accept a function as a second argument.</p>
<h3>Queueing</h3>
<p>Queueing has undergone an overhaul, improving the experience of working with queues other than the default <code>fx</code>.</p>
<p><strong>New .delay() method</strong> (<a href="http://api.jquery.com/delay/">.delay() documentation</a>, <a href="http://github.com/jquery/jquery/commit/bbd933cbfe6d31a749cb336d7a84155ccfab247f">commit</a>)</p>
<p>The <code>.delay()</code> method will delay any further elements in the queue for the specified number of milliseconds. By default, it will use the <code>fx</code> queue. You can specify an alternate queue as an optional second parameter to the delay function.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;div&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeIn</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">delay</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">4000</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeOut</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>Queue next</strong> (<a href="http://api.jquery.com/queue/">.queue() documentation</a>, <a href="http://github.com/jquery/jquery/commit/89b4bc53ca0ca3d4e5c80b94ce92b09cc34af8ef">commit</a>)</p>
<p>In jQuery 1.4 the function that&#8217;s called is passed in another function, as the first argument, that when called automatically dequeues the next item and keeps the queue moving.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;div&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">queue</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;ajax&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>next<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #003366; font-weight: bold;">var</span> self <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">;</span>
  jQuery.<span style="color: #660066;">getJSON</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;/update&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>json<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    $<span style="color: #009900;">&#40;</span>self<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>json.<span style="color: #660066;">text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    next<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">queue</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;ajax&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeIn</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>.clearQueue()</strong> (<a href="http://api.jquery.com/clearQueue/">documentation</a>, <a href="http://github.com/jquery/jquery/commit/d857315967a1cc07b73924bbdf2eb12f4f910c45">commit</a>)</p>
<p>Queues can now be cleared. This will remove any unexecuted functions from the queue, but not stop running functions. Using <code>.clearQueue()</code> without any parameters will clear the <code>fx</code> queue.</p>
<h3>Selectors</h3>
<p><strong>&#8220;#id p&#8221; is faster</strong> (<a href="http://github.com/jeresig/sizzle/commit/c5c18ae5f17f11b39b7f261633e4bfc5ef3e99d7">commit</a>) Any selector string that begins with an ID has an optimization to grab that immediately. ID rooted selectors will always be fastest.</p>
<h3>Traversing</h3>
<p><strong>.index(), .index(String)</strong> (<a href="http://api.jquery.com/index/">documentation</a>, <a href="http://github.com/jquery/jquery/commit/ffd457d4561eb1a6653aaef90f92a3b3010b9139">commit</a>)</p>
<p>The <code>.index()</code> method has been rewritten to be more far more intuitive and flexible.</p>
<p>You can now get the index of an element in relation to its siblings:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// get the index of the first</span>
&nbsp;
	<span style="color: #339933;">&lt;</span>li <span style="color: #003366; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;index&quot;</span><span style="color: #339933;">&gt;</span> <span style="color: #000066; font-weight: bold;">in</span> relation to its siblings<span style="color: #339933;">:</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;li.current&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">index</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span></pre></div></div>

<p>You can get the index of an element in relation to to the current jQuery collection by passing in a selector or DOM element:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// get the index of the</span>
&nbsp;
<span style="color: #339933;">&lt;</span>h3 id<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;more-info&quot;</span><span style="color: #339933;">&gt;</span> <span style="color: #000066; font-weight: bold;">in</span> relation to all<span style="color: #339933;">&lt;/</span>h3<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>h3<span style="color: #339933;">&gt;</span> elements<span style="color: #339933;">:</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#more-info&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">index</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;h3&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&lt;/</span>h3<span style="color: #339933;">&gt;</span></pre></div></div>

<p><strong>New .has() method</strong> (<a href="http://api.jquery.com/has/">documentation</a>, <a href="http://github.com/jquery/jquery/commit/4e27f17007c2329e31b449e61bb31197b90a37f1">commit</a>)</p>
<p>This is a method form of the <code>:has()</code> filter. It takes a given jQuery set and returns all of the same elements that contain a given selector.</p>
<p><strong>New .nextUntil(), .prevUntil(), .parentsUntil() methods</strong> (<a href="http://api.jquery.com/nextUntil/">.nextUntil() documentation</a>, <a href="http://api.jquery.com/prevUntil/">.prevUntil() documentation</a>, <a href="http://api.jquery.com/parentsUntil/">.parentsUntil() documentation</a>, <a href="http://github.com/jquery/jquery/commit/2b481b93cfca62f95aa7005e7db651456fa08e65">commit</a>)</p>
<p>The new &#8220;until&#8221; methods function similarly to <code>.nextAll()</code>, <code>.prevAll()</code>, <code>.parents()</code>, but the first argument they take is a selector that will terminate the traversal.</p>
<p><strong>.add(String, Element)</strong> (<a href="&lt;br &gt;&lt;/a&gt; http://api.jquery.com/add/&lt;br /&gt;">.add() documentation</a>, <a href="&lt;br &gt;&lt;/a&gt; http://github.com/jquery/jquery/commit/b0fe380cf89564305646bbd55d1fd7bd210fd591&lt;br /&gt;">commit</a>)<br />
The <code>.add()</code> now accepts a context. This is primarily useful in a chain when you want to add in addtional elements (returned from an ajax request, for example) and then manipulate those in addition to the others.</p>
<p><strong>.closest(filter, DOMElement)</strong> (<a href="http://api.jquery.com/closest/">.closest() documentation</a>, <a href="http://github.com/jquery/jquery/commit/d6991fa273515a8503692324499edcc71b5c3f64">commit</a>)</p>
<p>The closest method can now accept a context DOMElement as a second argument. Passing in a context will typically make your closest() calls much faster. This also applies to <code>live()</code> which leverages <code>closest()</code> internally.</p>
<h3>Utilities</h3>
<p><strong>jQuery.isEmptyObject()</strong> (<a href="http://api.jquery.com/jQuery.isEmptyObject/">jQuery.isEmptyObject() documentation</a>, <a href="http://github.com/jquery/jquery/commit/a38a5cd531a328319f8b7f3f33a84044b54591ce">commit</a>)</p>
<p>This returns true if there are <em>not</em> any properties on the object. You can only pass in objects to <code>jQuery.isEmptyObject()</code>, because jQuery performs an iteration on the object that is passed in without any other checks.</p>
<p><strong>jQuery.isPlainObject()</strong> (<a href="http://api.jquery.com/jQuery.isPlainObject/">jQuery.isPlainObject()</a>, <a href="http://github.com/jquery/jquery/commit/4b55e94d0849568a2fd121952f13a9d6571c731f">commit</a> )</p>
<p><code>jQuery.isPlainObject()</code> returns true if the object is an object literal and false if the object is another kind of object or a primitive.</p>
<p><strong>jQuery.contains()</strong> (<a href="http://api.jquery.com/jQuery.contains/">jQuery.contains() documentation</a>, <a href="http://github.com/jquery/jquery/commit/4e27f17007c2329e31b449e61bb31197b90a37f1">commit</a>)</p>
<p>jQuery.contains() returns true if both parameters are DOM nodes and the second parameter is contained inside the first.</p>
<p><strong>jQuery.noop</strong> (<a href="http://api.jquery.com/jQuery.noop/">jQuery.noop() documentation</a>, <a href="http://github.com/jquery/jquery/commit/6cb2945837ccca55204191a8e7a70b2b2486c28e">commit</a>)</p>
<p>jQuery.noop is empty function that can be used where a function is required.</p>
<p><strong>jQuery.unique()</strong> (<a href="http://api.jquery.com/jQuery.unique/">jQuery.unique() documentation</a>)</p>
<p>In jQuery 1.4, the <code>jQuery.unique()</code> method, which is used internally in the creation of the jQuery set, always returns results in document order. This means that jQuery sets returned from jQuery functions should be returned in document order.</p>
<h3>Miscellaneous</h3>
<p><strong>jQuery.browser is now engine-centric</strong> (<a href="http://api.jquery.com/jQuery.browser/">jQuery.browser documentation</a>, <a href="&lt;br &gt;&lt;/a&gt; http://github.com/jquery/jquery/commit/ffb1867a4364ea65e60dad3469e8c8eb420ebcac">commit</a>)</p>
<p>For example, you can now test for Webkit with <code>jQuery.browser.webkit</code>.</p>
<p><strong>Better support for applets</strong> (<a href="http://github.com/jquery/jquery/commit/59802928566b6be3a66d65e77c2418fff37e6f5f">commit 1</a>, <a href="http://github.com/jquery/jquery/commit/3ec2f1aef6b137d0f639e2fc53f95352d24b9d90">commit 2</a>)</p>
<p>jQuery no longer attempts to bind events or data to Java applets (which throw exceptions).</p>
<p><strong>No longer use arguments.callee </strong> (<a href="http://github.com/jquery/jquery/commit/985856b823b1648bffc3fd63c1faf836d0ddaf7c">commit</a>)</p>
<p>For compliance with Caja and because it is slated to be deprecated in the upcoming ECMAScript 5 specification, we have removed all references to <code>arguments.callee</code> in jQuery core.</p>
<p><strong>Now use Closure Compiler instead of YUI Min</strong> (<a href="http://github.com/jquery/jquery/commit/3fd62eae9df3159fc238a515bb748140a942313d">commit</a>)</p>
<h3>Internal Reorganization</h3>
<p>One of the major pushes that we made with 1.4 was towards building a more legible, understandable, code base. To achieve that we did some major restructuring of the of the code base internals and began to establish some style guidelines for the code base.</p>
<p>Some of the major changes that were made:</p>
<ul>
<li>The old &#8216;core.js&#8217; file has been split apart into &#8216;attribute.js&#8217;, &#8216;css.js&#8217;, &#8216;data.js&#8217;, &#8216;manipulation.js&#8217;, &#8216;traversing.js&#8217;, and &#8216;queue.js&#8217;.</li>
<li>The ready event has been moved into core.js (as it&#8217;s a fundamental part of jQuery itself).</li>
<li>The majority of core matches the new <a href="http://docs.jquery.com/JQuery_Core_Style_Guidelines">jQuery Core Style Guidelines</a>.</li>
<li>The logic for css and attributes have been split and aren&#8217;t so intertwined anymore.</li>
</ul>
<h3>Testing</h3>
<p>In jQuery 1.4 we&#8217;ve <a href="http://dev.jquery.com/report/34">fixed 207 bugs</a> (compared to 97 bugs in the 1.3 release).</p>
<p>Additionally we&#8217;ve increased our test coverage from 1504 tests in jQuery 1.3.2 to 3060 tests in jQuery 1.4.</p>
<p>The jQuery test suite is 100% passing in all the major browsers (Safari 3.2, Safari 4, Firefox 2, Firefox 3, Firefox 3.5, IE 6, IE 7, IE 8, Opera 10.10, and Chrome).</p>
<p><a title="jQuery 1.4 Test Run by John Resig, on Flickr" href="http://www.flickr.com/photos/jeresig/4272669542/"><img src="http://farm3.static.flickr.com/2764/4272669542_72e0abc0bd.jpg" alt="jQuery 1.4 Test Run" width="500" height="277" /></a></p>
<h2><a name="backwards">Backwards-Incompatible Changes</a></h2>
<p>With jQuery 1.4 we attempted to minimize any large upgrade hassles &#8211; maintaining the signatures of all public functions. That being said, please read through the following list to be aware of what might cause problems in your applications.</p>
<ul>
<li><a href="http://api.jquery.com/add">.add()</a> no longer plainly concatenates the results together, the results are merged and then sorted in document order.</li>
<li><a href="http://api.jquery.com/clone">.clone(true)</a> now copies events AND data instead of just events.</li>
<li><a href="http://api.jquery.com/jQuery.data">jQuery.data(elem)</a> no longer returns an id, it returns the element&#8217;s object cache instead.</li>
<li><a href="http://api.jquery.com/jQuery">jQuery()</a> (with no arguments) no longer converts to <a href="http://api.jquery.com/jQuery">jQuery(document)</a>.</li>
<li><a href="http://api.jquery.com/val">.val(&#8220;&#8230;&#8221;)</a> on an option or a checkbox is no longer ambiguous (it will always select by value now, not by text value). (<a href="http://github.com/jquery/jquery/commit/f298cce100c6fe23840ac95e66aaea9cb2bfb447">Commit</a>)</li>
<li><a href="http://api.jquery.com/jQuery.browser">jQuery.browser.version</a> now returns engine version.</li>
<li>We are now strict about incoming JSON and throw an exception if we get malformed JSON. If you need to be able to evaluate malformed JSON that is valid JavaScript, you can make a text request and use eval() to evaluate the contents.</li>
<li>Param serialization now happens in the PHP/Rails style by default. You can use <code>jQuery.ajaxSettings.traditional = true;</code> to use traditional parameter serialization. You can also set the behavior on a per-request basis by passing traditional: true to the <a href="http://api.jquery.com/jQuery.ajax">jQuery.ajax</a> method.</li>
<li>The internal jQuery.className removed.</li>
<li><a href="http://api.jquery.com/jQuery.extend">jQuery.extend(true, &#8230;)</a> No longer extends non-plain-objects or arrays.</li>
<li>If an <a href="http://api.jquery.com/jQuery.ajax">Ajax request</a> is made without specifying a dataType and it is returned as text/javascript, it will be executed. Previously, an explicit dataType was required.</li>
<li>Setting an <a href="http://api.jquery.com/jQuery.ajax">Ajax request&#8217;s</a> ifModified now takes ETags into consideration.</li>
</ul>
<p>We&#8217;ve also written <a href="http://github.com/jquery/jquery-compat-1.3">a plugin</a> that provides backwards compatibility with every potentially-breaking change that we&#8217;ve made in 1.4. Feel free to download and include this plugin, after you&#8217;ve included 1.4, if you have any issues upgrading to 1.4.</p>
<p>How to use the plugin:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://code.jquery.com/jquery.js&quot;</span>&gt;</span><span style="color: #808080; font-style: italic;">&lt;!--mce:0--&gt;</span><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://code.jquery.com/jquery.compat-1.3.js&quot;</span>&gt;</span><span style="color: #808080; font-style: italic;">&lt;!--mce:1--&gt;</span><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

<h2>Raw Data and Test Pages</h2>
<p>For the performance tests we used the following test suites:</p>
<ul>
<li><a href="http://ejohn.org/files/jquery1.4/slick/?type=attr">Attributes</a></li>
<li><a href="http://ejohn.org/files/jquery1.4/slick/?type=class">Class</a></li>
<li><a href="http://ejohn.org/files/jquery1.4/slick/?type=dom">DOM Manipulation</a></li>
<li><a href="http://ejohn.org/files/jquery1.4/slick/?type=empty">Empty/Remove</a></li>
<li>Function Call Profiling: <a href="http://ejohn.org/files/jquery-profile.html">1.3.2</a> <a href="http://ejohn.org/files/jquery-profile-14.html">1.4</a>.</li>
</ul>
<p>Raw data of the results (all numbers are 1.3.2 vs. 1.4):</p>
<pre># of function calls
547    3
760    3
500    200
896    399
23909    299
307    118
28955    100
28648    201
1662    593

DOM Insertion
558    317
1079    624
1079    516
1155    829
436    332
196    194
243    169

HTML
116    46
281    78
313    78
234    63
134    43
43    42
91    27

CSS/Attributes
703    370
1780    1250
1765    1250
1157    749
629    498
346    184
333    161

CSS
114    52
203    93
118    93
109    47
116    54
58    24
54    22

Classes
553    138
1578    546
1515    501
1033    327
769    298
229    80
173    41

Remove/Empty
3298    286
9030    2344
7921    1703
5282    1266
2898    303
1166    140
1034    122</pre>
]]></content:encoded>
			<wfw:commentRss>http://jquery14.com/day-01/jquery-14/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery 1.4 Live Q&amp;A</title>
		<link>http://jquery14.com/day-01/jquery-14-live-qa</link>
		<comments>http://jquery14.com/day-01/jquery-14-live-qa#comments</comments>
		<pubDate>Thu, 14 Jan 2010 13:00:17 +0000</pubDate>
		<dc:creator>jdsharp</dc:creator>
				<category><![CDATA[Day One]]></category>

		<guid isPermaLink="false">http://jquery14.com/?p=62</guid>
		<description><![CDATA[Thanks for everyone who tuned in! Here is the full Q&#038;A session in HD. A transcript is also being written.
]]></description>
			<content:encoded><![CDATA[<p>Thanks for everyone who tuned in! Here is the full Q&#038;A session in HD. A transcript is also being written.</p>
]]></content:encoded>
			<wfw:commentRss>http://jquery14.com/day-01/jquery-14-live-qa/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk (enhanced) (user agent is rejected)
Content Delivery Network via static.jquery.com/jquery14

Served from: blog.jquery.com @ 2010-09-02 15:45:45 -->