showhide
showhide()
This function is now deprecated and will soon be removed please use jQuery Toggle
This function is a simple toggle to switch between hiden and shown states typically applies to html div’s, by default this function uses the jQuery ’slow’ animation.
Usage
1 | $('#target_div_id').showhide(); |
The above will show the div if it is hidden with a css style of ‘display: none’, and hide the div if it is shown with a css style ‘display: block’.
Example
This is the div that will be toggled using showhide()
Example Source
1 |
This is the div that will be toggled using showhide()
Advanced
1 | $('#target_div_id').showhide({anim: 'slow'}); |
The anim, param specifies the animation, you can use any jQuery compatible animation or none at all i.e.
1 2 3 | $('#target_div_id').showhide({anim: 'slow'}); $('#target_div_id').showhide({anim: 'fast'}); $('#target_div_id').showhide({anim: ''}); |
Entries (RSS)