ICT
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:
SIGN UP RIGHT NOW FOR EMAIL UPDATES


Our Facebook Our News Letter Our Twitter

Recent Discussions

Hi. I would like to have the contact details for the owner of this website....
3 weeks ago 0 252
Uruguay striker Luis Suarez was banned for nine matches by FIFA on Thursday (loc...
3 weeks ago 0 280
Women are under-represented in the technology industry and recently Google admit...
4 weeks ago 0 256
&lt;blockquote&gt;Slingshot app Volt Slingshot: This is Facebook’s new p...
4 weeks ago 0 413
samsung may launch an even better version of the galaxy s5 in june Amazon’s F...
4 weeks ago 0 312

Social Login


Latest student Jobs

Ask a Question

FOLLOW US ON TWITTER

Follow us on Google+

I Have a Website