Please note, this is a STATIC archive of website www.w3schools.com from 05 May 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.
THE WORLD'S LARGEST WEB DEVELOPER SITE

What is jQuery?


jQuery

jQuery is a JavaScript library.

jQuery greatly simplifies JavaScript programming.

jQuery is easy to learn.


jQuery Hide and Show

With jQuery, you can hide and show HTML elements with the hide() and show() methods:

Example

$("#hide").click(function(){
    $("p").hide();
});

$("#show").click(function(){
    $("p").show();
});
Try it Yourself »

jQuery Sliding

With jQuery you can create sliding effects on HTML elements:

  • slideDown()
  • slideUp()
  • slideToggle()

Example

$("#flip").click(function(){
    $("#panel").slideDown();
});
Try it Yourself »

jQuery Animation

Example

$("button").click(function(){
    $("div").animate({
        left: '250px',
        height: '+=150px',
        width: '+=150px'
    });
}); 
Try it Yourself »


jQuery Manipulating CSS

Example

$("button").click(function(){
    $("h1, h2, p").toggleClass("blue");
});
Try it Yourself »