Jquery provides the basis for many of the new website platforms which are commonly referred to as Web 2.0 or Web 3.0.
jQuery is a library that makes it quicker and easier to build JavaScript webpages and web apps. Often with jQuery you can write a single line of code to achieve what would have taken 10-20 lines of regular JavaScript code.
jQuery is itself written in JavaScript, and comes in the form of a single .js file that you link to from your webpage.
Your JavaScript code then accesses the library by calling various jQuery functions.
What can you do with jQuery?
jQuery makes it easy to write powerful JavaScript apps and create eye-catching animated effects rivalling those of Flash movies. Amongst other things, jQuery is great for:
- Animated effects to elements. jQuery lets you easily add effects such as fading in/out, sliding in/out, and expanding/contracting.
- XML (Ajax) requests. These use JavaScript to request additional data from the Web server without having to reload the page.
- Manipulating the DOM. You can easily add, remove, and reorder content in the Web page using just a couple of lines of code.
- Image slideshows. You can use jQuery effects to build nice animated slideshows and lightboxes.
- Drop-down menus. jQuery makes it easy to create multi-level dropdowns with animations.
- Drag-and-drop interfaces. Use jQuery to build a page with elements that can be repositioned or reordered simply by dragging and dropping.
- Adding power to forms. With jQuery you can easily add complex client-side form validation, create auto-complete Ajax
jQuery is free to download and use, and is dual-licensed under the MIT and GPL licenses.
As well as the jQuery library itself, hundreds of jQuery plugins are available to add even more power and functionality to your scripts.
Another of jQuery’s strong points is that it makes it easy to write JavaScript that works on many different browsers. Incompatibilities between popular browsers such as IE, Firefox and Safari mean that you often need to write different chunks of JavaScript code for each browser. With jQuery, however, you just call the appropriate jQuery function and let jQuery deal with making the code run on different browsers. Nice!