Expand and collapse toggle div using jquery
This is a very simple tutorial on how to show and hide a division tag or Expand and collapse toggle div using simple jquery.
<script src=”http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js” type=”text/javascript”></script>
<script type=”text/javascript”>
$(document).ready(function(){
$(”#butShowHideSlow”).click(function () {
$(”#divShowHideSlow”).toggle(”slow”);
});
});
</script>
<button id=”butShowHideSlow”>Click Me</button>
<div style=”width:300px;height:47px; border: solid 1px black;background-color:white;text-align:center;” id=”divShowHideSlow”>Div that hide and show slowly</div>
Check out the DEMO here
Very Simple Right
Related posts:
- Jquery Basics, How to use jquery?
- Load Another Webpage Content Using Simple Jquery
- Replacing images with time intervals using jquery
- Slideshow using jquery
- Automatic Ajax Loading Images With Prototype
- Disable submit button on form submit
- Caching of images using javascript image object
