jQuery is a JavaScript Library that focuses on simplifying DOM manipulation, AJAX calls, and Event handling. It is used by JavaScript developers frequently.
jQuery uses a format, $(selector).action()
to assign an element(s) to an event. To explain it in detail, $(selector)
will call jQuery to select selector
element(s), and assign it to an event API called .action()
.
$(document).ready(function(){
alert("Hello World!");
$("#blackBox").hide();
});
The above code carries out the same function as the following code:
window.onload = function() {
alert( "Hello World!" );
document.getElementById("blackBox").style.display = "none";
};
Download jQuery
npm | bower (solo file) | Google CDN |
---|---|---|
npm install jquery |
bower install https://code.jquery.com/jquery-3.2.1.min.js |
https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js |
Learn more
General knowledge
- jQuery on Wikipedia
- jQuery Official Website