Tuesday, August 4, 2015

Jquery show/hide div on click toggle

<span class="button">botton</span>
<div class="content-area"> This is content area........... </div>
<script>
$( ".button" ).click(function() {
$( ".content-area" ).slideToggle();
});
</script>
and we have add script for speed of show/hide content.
$( ".content-area" ).slideToggle("slow");
$( ".content-area" ).slideToggle("fast");
For Custom.
$( ".content-area" ).slideToggle(500);

No comments: