The jQuery library contains the following features:
- HTML/DOM manipulation
- CSS manipulation
- HTML event methods
- Effects and animations
Many of the biggest companies on the Web use jQuery, such as:
The jQuery syntax is tailor-made for selecting HTML elements and performing some action on the element(s).
Basic syntax is: $(selector).action()
- A $ sign to define/access jQuery
- A (selector) to “query (or find)” HTML elements
- A jQuery action() to be performed on the element(s)
$("p").hide() – hides all <p> elements.
$(".test").hide() – hides all elements with class=”test”.
$("#test").hide() – hides the element with id=”test”.
$(this).hide() – hides the current element.