Here is the list of important core features supported by jQuery −
- Cross Browser Support − The jQuery has cross-browser support, and works well in IE 6.0+, FF 2.0+, Safari 3.0+, Chrome and Opera 9.0+
- Lightweight − The jQuery is very lightweight library – about 19KB in size ( Minified and gzipped ).
- Animations − The jQuery comes with plenty of built-in animation effects which you can use in your websites.
There are two ways to use jQuery.
- Local Installation − You can download jQuery library on your local machine and include it in your HTML code.
- You can include jQuery library into your HTML code directly from Content Delivery Network (CDN).
Simple Hello word using Jquery: –
jQuery selectors allow you to select and manipulate HTML element(s).
jQuery selectors are used to “find” (or select) HTML elements based on their id, classes, types, attributes, values of attributes and much more. It’s based on the existing CSS Selectors, and in addition, it has some own custom selectors.
All selectors in jQuery start with the dollar sign and parentheses: $().
|$(“*”)||Selects all elements|
|$(this)||Selects the current HTML element|
|$(“[href]”)||Selects all elements with an href attribute|
|$(“:button”)||Selects all <button> elements and <input> elements of type=”button”|
|$(“tr:even”)||Selects all even <tr> elements|
|$(“tr:odd”)||Selects all odd <tr> elements|
|$(“ul li:first”)||Selects the first <li> element of the first <ul>|