Two jquery methods are used:
1. show(): If the selected elements have been hidden, display these elements
Syntax
$(selector).show(speed,callback)
speed
Optional. Specifies how quickly an element goes from hidden to fully visible. Default is "0".
Possible values:
milliseconds (e.g. 1500)
"slow"
"normal"
"fast"
Set the speed at which an element goes from hidden to fully visible In the process, its height, width, margins, padding and transparency will be gradually changed.
callback
Optional. The function to be executed after the show function is executed.
This parameter cannot be set unless the speed parameter is set.
Tip: If the element is already fully visible, the effect will not change unless a callback function is specified.
Note: This effect applies to elements hidden through jquery, or elements declared with display:none in css (but not elements with visibility:hidden).
2. hide(): If the selected element is already displayed, hide the element.
Syntax
$(selector).hide(speed,callback)
speed
Optional. Specifies how quickly an element goes from visible to hidden. Default is "0".
Possible values:
milliseconds (e.g. 1500)
"slow"
"normal"
"fast"
The process of an element going from visible to hidden if the speed is set , will gradually change its height, width, margins, padding, and transparency.
callback
Optional. The function to be executed after the hide function is executed.
This parameter cannot be set unless the speed parameter is set.
Tip: If the element is already fully visible, the effect will not change unless a callback function is specified.