Friday, February 14, 2014

How TO Use Button For Toggling a Div Hide Or show Using Jquery




<html>
<style>
#toggle{
height:400px;
width:200px;
background:#cc3300;
}

</style>
<script>
$(document).ready(function(){

$("button").click(function(){
$("toggle").toggle("reaction"); //reaction=high or slow

});


});
</script>
<body>
<div id="toggle">
</div>
<button id="button">Button</button>
</body>
</html>