Professional Joomla Templates, Phpbb3 Styles, Wordpress Themes Club

Getting started with jQuery 1.9


jQuery 1.9 was released on January 15, 2013. several deprecated features have been removed to provide a slimmer, cleaner library in preparation for version 2.0. it will be the last to support IE6, 7 and 8

In making these changes, the team's goal was to fix behavior that makes jQuery inconsistent or hard to use, and in the process improve both file size and overall performance.

This list is deceptively foreboding. Most of these changes address special situations and edge cases, and a few are changes that have been widely requested where jQuery's historical behavior has been problematic. As a first step, the best way to see if your code works is to try it with both jQuery 1.9 and the Migrate Plugin as described below.

For now, this guide serves as an appendix to the standard jQuery API documentation, and those pages may not describe the behavior of version 1.9. Please be patient while we update the documentation for the individual pages at api.jquery.com to reflect the changes in 1.9.

Removed Features

This should not be considered a definitive list of removals, but they are the most likely to cause compatibility problems. As always, thorough testing is your best option…

jQuery.browser() — removed

.live() events — use .on() instead

.die() — use .off() instead

.andSelf() — use .addBack() instead

.add() — nodes are now returned in document order with disconnected nodes (those not in the document) at the end. All sets which contain disconnected nodes follow this behavior

.after(), .before(), .replaceWith() — now return an unmodified jQuery set

.appendTo, .insertBefore, .insertAfter, .replaceAll — if no elements can be selected by the target selector, e.g. $(elements).appendTo("#not_found")), the resulting set is now empty

Ajax events must be attached to the document — not a DOM node, i.e.$(document).ajaxStart(...); rather than $("#node").ajaxStart(...);

radio/checkbox click events — now returns the checked state rather than the state it would have been in if .preventDefault() were not called

Order of focus events — blur events on the previous element are now fired prior to focus events on the new element

jQuery(htmlString) — htmlString is only considered to be HTML (rather than a selector) if it starts with a ‘<’ character

.attr() — you should normally use .prop()

“hover” pseudo-event — “hover” is no longer supported as a synonym for “mouseenter mouseleave”

jQuery.ajax returning an empty JSON result — this is now considered to be malformed JSON and throws an error

Did you enjoy this blog post? If so, then why not:

Our Facebook Our News Letter Our Twitter

Recent Discussions

MultiChoice has announced the launch of a number of new Internet-based features ...
2 weeks ago 0 216
&lt;img src="http://mybroadband.co.za/news/wp-content/uploads/2014/11/C...
2 weeks ago 0 357
&lt;img src="https://lh5.googleusercontent.com/-NCEJYZNCW4U/VBvdpLN-CVI...
2 months ago 0 604
Hello, I represent the Publisher Partnerships team at Media.net and I wanted ...
2 months ago 0 511
&lt;img src="http://stuppid.com/wp-content/uploads/2014/09/susan-electr...
2 months ago 0 679

Social Login

Latest student Jobs

Ask a Question


Follow us on Google+

I Have a Website