Jquery Slidetoggle Example - Jquery

How to produce slidetoggle effect in jquery?

Snippet Code


  
Rate this page :
  [ 0 votes]

Simple jquery code allows you to create slidetoggle effect on elements. The sample code given below used to toggle between slideup() and slidedown().

<script type='text/javascript'> $(document).ready(function(){ $("#btn").click(function(){ $("p").slideToggle(); }); }); </script> <div align='center'> <p>Welcome to Hscripts.com.</p> <input type='button' id='btn' value='SlideUp / SlideDown'> </div>

Tags


Ask Questions

Ask Question