jQuery Examples

Improve your jQuery skills through examples!

jQuery syntax examples

$("this").hide()
Demonstrate the jQuery hide() function, hiding the current HTML element.
$("p").hide()
Demonstrate the jQuery hide() function, hiding all <p> elements.
$(".test").hide()
Demonstrate the jQuery hide() function, hiding all elements with class="test".
$("#test").hide()
Demonstrate the jQuery hide() function, hiding the element with id="test".

Example explanation

Hiding - Sliding - Fading

jQuery fadeOut()
Demonstrate the simple jQuery fadeout() function.
jQuery hide()
Demonstrate the simple jQuery hide() function.
Hide explanations
Demonstrate how to hide part of the text.
Slide panel
Demonstrate the simple Slide Panel effect.
jQuery animate()
Demonstrate the simple jQuery animate() function.

Example explanation

HTML operations

Change the content of an HTML element.

Append content to an HTML element.

Append content after an HTML element.

Example explanation

CSS operations

Change the CSS properties of an HTML element.

Change multiple CSS properties.

Get the CSS properties of an element.

Example explanation

AJAX and jQuery

Use $(selector).load(url) to change HTML content.

Use $.ajax(options) to change HTML content.

Example explanation