jQuery

jQuery Intro

jQuery Intro Quiz

jQuery Intro Exercise

jQuery Basic

jQuery Basic Quiz

jQuery Basic Exercise

jQuery Advance

jQuery Advance Quiz

jQuery Advance Exercise

jQuery Selectors

jQuery Effects

jQuery Events

jQuery Methods and Properties

jQuery Traversing

jQuery CSS and HTML Methods

jQuery toggle() Method

jQuery toggle() Method

 

 

The toggle() method is used to toggles between hide() and show() for the selected elements. If the element is visible, it will use the hide() method to hide that element. If the element is hidden, then it will use show() method to show it.

 

Syntax:-

 

Its syntax is:- $(selector).toggle(speed, easing, callback)

 

Further Explanation:-

 

Parameter Description
speed Optional. Specifies the speed of the effect.
easing Optional. Specifies the speed of the element in different points of the animation. Default is swing
callback Optional. A function to be executed after the toggle() method is completed

Code Explanation

All Tutorials related to jQuery Effects

All Sections related to jQuery