jQuery Hide and Show
jQuery Hide and Show method is used to hide and show the html elements.
jQuery Hide and Show Syntax :
$(selector).hide(speed,selector); $(selector).show(speed,selector);
jQuery Hide and Show Example 1:
hide() : Hides the html elements.
show() : Displays the html elements.
Example
<script type="text/javascript"> $(document).ready(function(){ $("#hidebutton").click(function(){ $(".demo-para").hide(); }); $("#showbutton").click(function(){ $(".demo-para").show(); }); }); </script> |
jQuery Hide and Show Example 2:
Example
<script type="text/javascript"> $(document).ready(function(){ $("#hidebutton").click(function(){ $(".demo-para").hide(500); }); $("#showbutton").click(function(){ $(".demo-para").show(500); }); }); </script> |
Advertisements
Add Comment
📖 Read More
- 6. jQuery Slide Toggle
- 7. jQuery Slide Up
- 8. jQuery Animate
- 9. jQuery Chaining
- 10. jQuery CallBack