Home » Tag Archives: jQuery div Hide and show

Tag Archives: jQuery div Hide and show

jQuery div Hide and show on click

jQuery div Hide and show <style> #smarttipsdiv { width: 90%; margin:auto; height:200px; background-color: #008000; } a  { font-size: 100%;  font-weight: normal;  } </style> <script> $(document).ready(function(){ $(‘#toggle’).click(function(e){ e.preventDefault(); var isvisible = $(‘#smarttipsdiv’).is(‘:visible’); if(isvisible) { $(‘#smarttipsdiv’).slideUp(); } else { $(‘#smarttipsdiv’).slideDown(); } }); }); </script> <a id=’toggle’ href=”#”>Heading</a> <div id=”smarttipsdiv”></div>

Read More »