jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript.
We will cover each and every topic & point of jQuery chapter by chapter with example. And With our online editor, you can edit the code, and click on run button to view the result. Some Standard features...
Get the <button> element with the class 'continue' and change its HTML to 'Next Step...'
$( "button.continue" ).html( "Next Step..." )
Show the #banner-message element that is hidden with display:none in its CSS when any button in #button-container is clicked.
var hiddenBox = $( "#banner-message" );
$( "#button-container button" ).on( "click", function( event ) {
hiddenBox.show();
});
Call a local script on the server /api/getWeather with the query parameter zipcode=97201 and replace the element #weather-temp's html with the returned text.
$.ajax({
url: "/api/getWeather",
data: {
zipcode: 97201
},
success: function( result ) {
$( "#weather-temp" ).html( "<strong>" + result + "</strong> degrees" );
}
});
- The main purpose of using jQuery is to provide an easier way to use JavaScript in our applications. jQuery provides us with readymade methods that have various functionalities and make our work much easier, faster and effective.
- Another benefit of jQuery is that it is easily compatible with various browsers or we can say that it is cross-platform compatible.
- Even though there are various other JavaScript frameworks available in the market like Dojo, Ext Js, etc., but jQuery is the most popular and widely used framework because of its easy handling.
Let's start to learn jQuery with Skillsbattle jQuery tutorial. Start learning jQuery now ยป