Select $('body') - Javascript jQuery

Javascript examples for jQuery:Selector

Description

Select $('body')

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script> 
      <script type="text/javascript">
      var b = $('body');
      console.log("$('body').length == " + b.length);
    //from  ww  w .j  a  v  a2 s.co  m
      </script> 
   </head> 
   <body> 
      <h1>Hello World!</h1>  
   </body>
</html>

Related Tutorials