jQuery | hide() with Examples
The hide() is an inbuilt method in jQuery used to hide the selected element.
$(selector).hide(duration, easing, call_function);
Here selector is the selected element.
Parameter: It accepts three parameters which are specified below-
- duration: It specifies the speed of the hide effect.
- easing: It specifies the speed of the element at different point of animation.
- call_function: This is call back function to be executed after hide operation.
Return Value: It does not return any value.
In the below code, no parameter is used to pass to this method.
Before clicking on “Click me!” button-
After clicking on “Click me!” button-
In the below code, parameter is passed to this method.
Before clicking on the “Click to Hide” button-
After clicking on the “Click to Hide” button-