Thursday, April 8, 2010

jQuery Features

jQuery Features
* DOM element selections functions
* DOM traversal and modification
* Events
* CSS manipulation
* Effects and animations
* Ajax
* Extensibility
* Utilities - such as browser version and the each function.
* JavaScript Plugins

Tuesday, April 6, 2010

jQuery Version History

Release date Version number Additional notes
August 26, 2006 1.0 First Stable Release
August 31, 2006 1.0.1
October 9, 2006 1.0.2
October 27, 2006 1.0.3
December 12, 2006 1.0.4 Last 1.0 bug fix
January 14, 2007 1.1
January 22, 2007 1.1.1
February 27, 2007 1.1.2
July 1, 2007 1.1.3
July 5, 2007 1.1.3.1
August 24, 2007 1.1.4
September 10, 2007 1.2
September 16, 2007 1.2.1
January 15, 2008 1.2.2
February 8, 2008 1.2.3
May 19, 2008 1.2.4
May 21, 2008 1.2.5 Fix for bad build of 1.2.4
May 24, 2008 1.2.6
January 14, 2009 1.3 Sizzle Selector Engine introduced into core
January 21, 2009 1.3.1
February 20, 2009 1.3.2
January 14, 2010 1.4
January 25, 2010 1.4.1
February 19, 2010 1.4.2

Monday, April 5, 2010

jQuery , mootools conflict

jQuery.noConflict()

Run this function to give control of the $ variable back to whichever library first implemented it.
jQuery.noConflict() → jQuery
Description:
This helps to make sure that jQuery doesn't conflict with the $ object of other libraries. By using this function, you will only be able to access jQuery using the 'jQuery' variable. For example, where you used to do $("div p"), you now must do jQuery("div p").

NOTE:
This function must be called after including the jQuery javascript file, but '''before''' including any other conflicting library, and also before actually that other conflicting library gets used, in case jQuery is included last. noConflict can be called at the end of the jQuery.js file to globally disable the $() jQuery alias. jQuery.noConflict returns a reference to jQuery, so it can be used to override the $() alias of the jQuery object.
Example:
Maps the original object that was referenced by $ back to $.
jQuery.noConflict();
  // Do something with jQuery
  jQuery("div p").hide();
  // Do something with another library's $()
  $("content").style.display = 'none';
  
Example:
Reverts the $ alias and then creates and executes a function to provide the $ as a jQuery alias inside the functions scope. Inside the function the original $ object is not available. This works well for most plugins that don't rely on any other library.
jQuery.noConflict();
   (function($) { 
   $(function() {
   // more code using $ as alias to jQuery
   });
   })(jQuery);
   // other code using $ as an alias to the other library
  
Example:
You can chain the jQuery.noConflict() with the shorthand ready for a compact code.
jQuery.noConflict()(function(){
   // code using jQuery
   }); 
   // other code using $ as an alias to the other library
  


Example:
Creates a different alias instead of jQuery to use in the rest of the script.
var j = jQuery.noConflict();
   // Do something with jQuery
   j("div p").hide();
   // Do something with another library's $()
   $("content").style.display = 'none';
  

Saturday, April 3, 2010

What is jQuery ?

jQuery is a lightweight cross-browser JavaScript library that emphasizes interaction between JavaScript and HTML. It was released in January 2006 at BarCamp NYC by John Resig. Used by over 27% of the 10,000 most visited websites, jQuery is the most popular JavaScript library in use today.

jQuery is free, open source software, dual-licensed under the MIT License and the GNU General Public License, Version 2. jQuery's syntax is designed to make it easier to navigate a document, select DOM elements, create animations, handle events, and develop Ajax applications. jQuery also provides capabilities for developers to create plugins on top of the JavaScript library. Providing this option, developers are able to create abstractions for low-level interaction and animation, advanced effects and high-level, theme-able widgets. This contributes to the creation of powerful and dynamic web pages.

Microsoft and Nokia have announced plans to bundle jQuery on their platforms,Microsoft adopting it initially within Visual Studio for use within Microsoft's ASP.NET AJAX framework and ASP.NET MVC Framework whilst Nokia has integrated it into their Web Run-Time widget development platform.


Features
jQuery contains the following features:

•DOM element selections using the cross-browser open source selector engine Sizzle, a spin-off out of the jQuery project
•DOM traversal and modification (including support for CSS 1-3)
•Events
•CSS manipulation
•Effects and animations
•Ajax
•Extensibility through plugins
•Utilities - such as browser version and the each function.