Hide/Remove content with Javascript/jQuery - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:toggle

Description

Hide/Remove content with Javascript/jQuery

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> 
  <style id="compiled-css" type="text/css">
.remove{position:absolute;}
  </style> 
  <script type="text/javascript">
    $(window).load(function(){/* w w w.  ja  va2s .  c  o  m*/
$(document).ready(function(){
    $('.remove').toggle();
});
    });

      </script> 
 </head> 
 <body> 
  <p class="remove">Text removed on load.</p>  
 </body>
</html>

Related Tutorials