{"id":409,"date":"2013-07-01T09:52:35","date_gmt":"2013-07-01T09:52:35","guid":{"rendered":"http:\/\/www.siriinnovations.com\/blog\/?p=409"},"modified":"2013-07-21T14:09:30","modified_gmt":"2013-07-21T14:09:30","slug":"whats-new-in-jquery-1-9","status":"publish","type":"post","link":"https:\/\/siriinnovations.com\/blog\/whats-new-in-jquery-1-9\/","title":{"rendered":"What\u2019s New in jQuery 1.9?"},"content":{"rendered":"<p><strong>Introduction:<\/strong>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.<\/p>\n<p><strong>jQuery Migrate Plug-in:<\/strong><\/p>\n<p>The jQuery migrate plugin should ease your upgrade woes. The plugin provides two essential facilities:<\/p>\n<ol start=\"1\">\n<li>It re-enables deprecated features so your v1.8-compatible code will work again, and<\/li>\n<li>It logs warnings to the developer console when deprecated features are used. You should find it easier to fix issues.<\/li>\n<\/ol>\n<p>The migrate plugin should be loaded immediately after jQuery, e.g.<\/p>\n<p><code>&lt;script src=\"http:\/\/code.jquery.com\/jquery-1.9.0.js\"&gt;&lt;\/script&gt;<br \/>\n&lt;script src=\"http:\/\/code.jquery.com\/jquery-migrate-1.0.0.js\"&gt;&lt;\/script&gt;<\/code><\/p>\n<p><strong>Removed Features:<\/strong><\/p>\n<ul>\n<li><strong>jQuery.browser()<\/strong> \u2014 removed<\/li>\n<li><strong>.live()<\/strong> events \u2014 use <a href=\"http:\/\/api.jquery.com\/on\/\">.on()<\/a> instead<\/li>\n<li><strong>.die()<\/strong> \u2014 use <a href=\"http:\/\/api.jquery.com\/off\/\">.off()<\/a> instead<\/li>\n<li><strong>.andSelf() \u2014 use <a href=\"http:\/\/api.jquery.com\/addBack\/\">.addBack()<\/a> instead<\/strong><\/li>\n<li><strong>.add()<\/strong> \u2014 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<\/li>\n<li><strong>.after(), .before(), .replaceWith()<\/strong> \u2014 now return an unmodified jQuery set<\/li>\n<li><strong>.appendTo, .insertBefore, .insertAfter, .replaceAll<\/strong> \u2014 if no elements can be selected by the target selector, e.g. $(elements).appendTo(&#8220;#not_found&#8221;)), the resulting set is now empty<\/li>\n<li><strong>Ajax events must be attached to the document<\/strong> \u2014 not a DOM node, i.e. $(document).ajaxStart(&#8230;); rather than $(&#8220;#node&#8221;).ajaxStart(&#8230;);<\/li>\n<li><strong>radio\/checkbox click events<\/strong> \u2014 now returns the checked state rather than the state it would have been in if .preventDefault() were not called<\/li>\n<li><strong>Order of focus events<\/strong> \u2014 blur events on the previous element are now fired prior to focus events on the new element<\/li>\n<li><strong>jQuery(htmlString)<\/strong> \u2014 htmlString is only considered to be HTML (rather than a selector) if it starts with a \u2018&lt;\u2019 character<\/li>\n<li><strong>.attr()<\/strong> \u2014 you should normally use <a href=\"http:\/\/api.jquery.com\/prop\/\">.prop()<\/a><\/li>\n<li><strong>\u201chover\u201d pseudo-event<\/strong> \u2014 \u201chover\u201d is no longer supported as a synonym for \u201cmouseenter mouseleave\u201d<\/li>\n<li><strong>jQuery.ajax returning an empty JSON result<\/strong> \u2014 this is now considered to be malformed JSON and throws an error<\/li>\n<\/ul>\n<p><strong>New Features:<\/strong><\/p>\n<p><strong>.css() multi-property getter:<\/strong><br \/>\nIt\u2019s now possible to pass an array of CSS property names to the .css() method. It returns an object with the current values, e.g.<\/p>\n<pre><code>var dims = $(\"#box\").css([ \"width\", \"height\", \"backgroundColor\" ]);<\/code><\/pre>\n<pre><code>\/\/ { width: \"10px\", height: \"20px\", backgroundColor: \"#D00DAD\" }<\/code><\/pre>\n<p><strong>CSS3 selector support:<\/strong><\/p>\n<p>The Sizzle selector engine supports the following CSS3 selectors in all browsers: <code>:nth-last-child<\/code>, <code>:nth-of-type<\/code>, <code>:nth-last-of-type<\/code>, <code>:first-of-type<\/code>, <code>:last-of-type<\/code>, <code>:only-of-type<\/code>, <code>:target<\/code>, <code>:root<\/code>, and <code>:lang<\/code>.<\/p>\n<p><strong>.finish() method:<\/strong><\/p>\n<p>The .finish() method stops all queued animations and places the element(s) in their final state. This could be handled in previous editions using combinations of .stop() and .clearQueue(), but .finish() is easier to use.<\/p>\n<p><strong>Source map support:<\/strong><\/p>\n<p>Source maps allow you to debug a production site which uses minified scripts or CSS. In essence, the browser\u2019s debugger maps lines in the compressed file to the uncompressed source so it\u2019s easier to view code, set breakpoints, change values etc.<\/p>\n<h3>Undocumented arguments of API methods:<\/h3>\n<p>Prior to 1.9, several API methods had undocumented arguments that changed their behavior and created the potential for accidental misuse or incorrect duck punching. These arguments have now been removed. Affected methods include <code>jQuery.data()<\/code>, <code>jQuery.removeData()<\/code>, and <code>jQuery.attr()<\/code>. The jQuery Migrate plugin does not support these undocumented arguments because the refactored code no longer requires it.<\/p>\n<h3>Other undocumented properties and methods:<\/h3>\n<p>The following internal properties and methods were never documented and have been removed in 1.9. Any code that depends on them should be rewritten.<\/p>\n<ul>\n<li><code>jQuery.deletedIds<\/code><\/li>\n<li><code>jQuery.uuid<\/code><\/li>\n<li><code>jQuery.attrFn<\/code><\/li>\n<li><code>jQuery.clean()<\/code><\/li>\n<li><code>jQuery.event.handle()<\/code><\/li>\n<li><code>jQuery.offset.bodyOffset()<\/code><code><\/code><\/li>\n<\/ul>\n<h3>Reference:<\/h3>\n<p><a href=\"http:\/\/jquery.com\/upgrade-guide\/1.9\/\">http:\/\/jquery.com\/upgrade-guide\/1.9\/\u00a0<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: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. jQuery Migrate Plug-in: The jQuery migrate plugin should ease your upgrade woes. The plugin provides two essential facilities: It re-enables deprecated features so your v1.8-compatible code will [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,5,6],"tags":[60],"class_list":["post-409","post","type-post","status-publish","format-standard","hentry","category-development","category-jquery","category-tutorials","tag-jquery-2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What\u2019s New in jQuery 1.9? - Siri Innovations<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/siriinnovations.com\/blog\/whats-new-in-jquery-1-9\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What\u2019s New in jQuery 1.9? - Siri Innovations\" \/>\n<meta property=\"og:description\" content=\"Introduction: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. jQuery Migrate Plug-in: The jQuery migrate plugin should ease your upgrade woes. The plugin provides two essential facilities: It re-enables deprecated features so your v1.8-compatible code will [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/siriinnovations.com\/blog\/whats-new-in-jquery-1-9\/\" \/>\n<meta property=\"og:site_name\" content=\"Siri Innovations\" \/>\n<meta property=\"article:published_time\" content=\"2013-07-01T09:52:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-07-21T14:09:30+00:00\" \/>\n<meta name=\"author\" content=\"Yuva kumar\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Yuva kumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/siriinnovations.com\/blog\/whats-new-in-jquery-1-9\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/siriinnovations.com\/blog\/whats-new-in-jquery-1-9\/\"},\"author\":{\"name\":\"Yuva kumar\",\"@id\":\"https:\/\/siriinnovations.com\/blog\/#\/schema\/person\/e2941c65eca1eecb5bf7e44fb9f6f9c0\"},\"headline\":\"What\u2019s New in jQuery 1.9?\",\"datePublished\":\"2013-07-01T09:52:35+00:00\",\"dateModified\":\"2013-07-21T14:09:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/siriinnovations.com\/blog\/whats-new-in-jquery-1-9\/\"},\"wordCount\":515,\"commentCount\":0,\"keywords\":[\"jquery\"],\"articleSection\":[\"Development\",\"jQuery\",\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/siriinnovations.com\/blog\/whats-new-in-jquery-1-9\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/siriinnovations.com\/blog\/whats-new-in-jquery-1-9\/\",\"url\":\"https:\/\/siriinnovations.com\/blog\/whats-new-in-jquery-1-9\/\",\"name\":\"What\u2019s New in jQuery 1.9? - Siri Innovations\",\"isPartOf\":{\"@id\":\"https:\/\/siriinnovations.com\/blog\/#website\"},\"datePublished\":\"2013-07-01T09:52:35+00:00\",\"dateModified\":\"2013-07-21T14:09:30+00:00\",\"author\":{\"@id\":\"https:\/\/siriinnovations.com\/blog\/#\/schema\/person\/e2941c65eca1eecb5bf7e44fb9f6f9c0\"},\"breadcrumb\":{\"@id\":\"https:\/\/siriinnovations.com\/blog\/whats-new-in-jquery-1-9\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/siriinnovations.com\/blog\/whats-new-in-jquery-1-9\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/siriinnovations.com\/blog\/whats-new-in-jquery-1-9\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/siriinnovations.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What\u2019s New in jQuery 1.9?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/siriinnovations.com\/blog\/#website\",\"url\":\"https:\/\/siriinnovations.com\/blog\/\",\"name\":\"Technical blog from Siri Innovations\",\"description\":\"Innovative like no other\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/siriinnovations.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/siriinnovations.com\/blog\/#\/schema\/person\/e2941c65eca1eecb5bf7e44fb9f6f9c0\",\"name\":\"Yuva kumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/siriinnovations.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/687772b38575bc5be6e95c834b31796b82c9a71158f171c0323ac991815f38b2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/687772b38575bc5be6e95c834b31796b82c9a71158f171c0323ac991815f38b2?s=96&d=mm&r=g\",\"caption\":\"Yuva kumar\"},\"url\":\"https:\/\/siriinnovations.com\/blog\/author\/yuvakumar\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What\u2019s New in jQuery 1.9? - Siri Innovations","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/siriinnovations.com\/blog\/whats-new-in-jquery-1-9\/","og_locale":"en_US","og_type":"article","og_title":"What\u2019s New in jQuery 1.9? - Siri Innovations","og_description":"Introduction: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. jQuery Migrate Plug-in: The jQuery migrate plugin should ease your upgrade woes. The plugin provides two essential facilities: It re-enables deprecated features so your v1.8-compatible code will [&hellip;]","og_url":"https:\/\/siriinnovations.com\/blog\/whats-new-in-jquery-1-9\/","og_site_name":"Siri Innovations","article_published_time":"2013-07-01T09:52:35+00:00","article_modified_time":"2013-07-21T14:09:30+00:00","author":"Yuva kumar","twitter_misc":{"Written by":"Yuva kumar","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/siriinnovations.com\/blog\/whats-new-in-jquery-1-9\/#article","isPartOf":{"@id":"https:\/\/siriinnovations.com\/blog\/whats-new-in-jquery-1-9\/"},"author":{"name":"Yuva kumar","@id":"https:\/\/siriinnovations.com\/blog\/#\/schema\/person\/e2941c65eca1eecb5bf7e44fb9f6f9c0"},"headline":"What\u2019s New in jQuery 1.9?","datePublished":"2013-07-01T09:52:35+00:00","dateModified":"2013-07-21T14:09:30+00:00","mainEntityOfPage":{"@id":"https:\/\/siriinnovations.com\/blog\/whats-new-in-jquery-1-9\/"},"wordCount":515,"commentCount":0,"keywords":["jquery"],"articleSection":["Development","jQuery","Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/siriinnovations.com\/blog\/whats-new-in-jquery-1-9\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/siriinnovations.com\/blog\/whats-new-in-jquery-1-9\/","url":"https:\/\/siriinnovations.com\/blog\/whats-new-in-jquery-1-9\/","name":"What\u2019s New in jQuery 1.9? - Siri Innovations","isPartOf":{"@id":"https:\/\/siriinnovations.com\/blog\/#website"},"datePublished":"2013-07-01T09:52:35+00:00","dateModified":"2013-07-21T14:09:30+00:00","author":{"@id":"https:\/\/siriinnovations.com\/blog\/#\/schema\/person\/e2941c65eca1eecb5bf7e44fb9f6f9c0"},"breadcrumb":{"@id":"https:\/\/siriinnovations.com\/blog\/whats-new-in-jquery-1-9\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/siriinnovations.com\/blog\/whats-new-in-jquery-1-9\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/siriinnovations.com\/blog\/whats-new-in-jquery-1-9\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/siriinnovations.com\/blog\/"},{"@type":"ListItem","position":2,"name":"What\u2019s New in jQuery 1.9?"}]},{"@type":"WebSite","@id":"https:\/\/siriinnovations.com\/blog\/#website","url":"https:\/\/siriinnovations.com\/blog\/","name":"Technical blog from Siri Innovations","description":"Innovative like no other","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/siriinnovations.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/siriinnovations.com\/blog\/#\/schema\/person\/e2941c65eca1eecb5bf7e44fb9f6f9c0","name":"Yuva kumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/siriinnovations.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/687772b38575bc5be6e95c834b31796b82c9a71158f171c0323ac991815f38b2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/687772b38575bc5be6e95c834b31796b82c9a71158f171c0323ac991815f38b2?s=96&d=mm&r=g","caption":"Yuva kumar"},"url":"https:\/\/siriinnovations.com\/blog\/author\/yuvakumar\/"}]}},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/siriinnovations.com\/blog\/wp-json\/wp\/v2\/posts\/409","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/siriinnovations.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/siriinnovations.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/siriinnovations.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/siriinnovations.com\/blog\/wp-json\/wp\/v2\/comments?post=409"}],"version-history":[{"count":10,"href":"https:\/\/siriinnovations.com\/blog\/wp-json\/wp\/v2\/posts\/409\/revisions"}],"predecessor-version":[{"id":434,"href":"https:\/\/siriinnovations.com\/blog\/wp-json\/wp\/v2\/posts\/409\/revisions\/434"}],"wp:attachment":[{"href":"https:\/\/siriinnovations.com\/blog\/wp-json\/wp\/v2\/media?parent=409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/siriinnovations.com\/blog\/wp-json\/wp\/v2\/categories?post=409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/siriinnovations.com\/blog\/wp-json\/wp\/v2\/tags?post=409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}