Blog

jQuery New Features QuickCatchUp

By Anbazhagan Devaraj Blogs | JQuery Mar 27, 2012
In this blog you will see a new new features of jquery QuickCatchUp.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml" >
   <
head>
       <
title>Untitled Page</title>
   </
head>
<
body>
<
pre>
<
b><u>jQuery 1.7 New Features - Quick Catch Up</u></b>
<
b>1. New API events : .on() and .off()</b>
The bind(), live(), and delegate() methods are replaced by the new on() and off() methods. These methods handle the new method of event binding. So there's no need to use bind(),delegate() and live() methos. The on() and off() methods consolidate these disparate methods into single.

<b>.on() event :</b>

The .on() event handler is designed to replace both the delegate() and bind() event handlers.

<b>Example:</b>

$(elems).bind(events, fn) $(elems).on(events, fn)
$(elems).bind(events, { mydata: 12 }, fn) $(elems).on(events, { mydata: 12 }, fn)
$(elems).unbind(events, fn) $(elems).off(events, fn)
$(elems).delegate(events, selector, fn) $(elems).on(events, selector, fn)
$(selector).live(events, fn) $(document).on(events, selector, fn)

<
b>.off() event :</b>
The .offn() event handler is designed to replace both the unbind() or undelegate() event handlers.

<b>Example:</b>

$(elems).undelegate(events, selector, fn) $(elems).off(events, selector, fn)

$(selector).die(events, fn) $(document).off(events, selector, fn)

<b>2. isNumeric() method</b>

The new isNumeric() function returns true if a value is a number. Also it is validate for decimal Hex numbers and exponential strings,negative numbers, decimal numbers and octal integer.

<b>Example :</b>
$.isNumeric(true); // false
$.isNumeric(""); // false
$.isNumeric(NaN); // false
$.isNumeric(undefined); // false
$.isNumeric(null); // false
$.isNumeric("-60"); // true
$.isNumeric(13); // true
$.isNumeric(0xFF); // true
$.isNumeric("0xFF"); // true
$.isNumeric("8e5"); // true (exponential notation string)
$.isNumeric(3.14); // true
$.isNumeric(+13); // true
$.isNumeric(0144); // true (octal integer literal)

<b>3. Removed :</b> The event.layerX and event.layerY methods have been removed.

<b>4. Removed :</b> Undocumented methods that are removed from jQuery 1.7 are jQuery.isNaN() and jQuery.event.proxy().

<b>5. Better Support for HTML5 in IE6/IE7/IE8</b>

The older browsers don't understand the new HTML5 tags like &lt;header&gt;, &lt;article&gt;, etc. Moreover, they remove any such tags encountered in the HTML. With jQuery 1.7, the .html() method adds support for HTML5 tags on older browsers.  

<b>6. New Callback Object</b>

A multi-purpose callbacks list object that provides a powerful way to manage callback lists. The jQuery.Deferred() is extended with new progress handlers and notification methods that call those
handlers. Deferred are now implemented using the jQuery.Callbacks() object, which provides a generalized way of queuing and triggering a series of handlers.
$.Callbacks() support a number of methods including callbacks.add(),callbacks.remove(), callbacks.fire() and callbacks.disable(). 
</pre> 
</body>
</
html>

COMMENT USING