Show with fade-slide for hidden text when you click on a text - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:fadeIn

Description

Show with fade-slide for hidden text when you click on a text

Demo Code

ResultView the demo in separate window

<!doctype html>
<html>
 <head> 
  <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.min.js"></script> 
  <style>

div.hide { display: none; }
div.show { }//from   w  ww. j av a  2s .c o m


      </style> 
  <script>
    function showText()
      {
       $('#text1').slideToggle();
      }
 
      </script> 
 </head> 
 <body> 
  <a onclick="showText('text1','text2')" href="javascript:void(0);">text</a> 
  <div id="text1" class="hide">
    hidden text 
  </div>  
 </body>
</html>

Related Tutorials