Modifying Width using jQuery - Javascript jQuery

Javascript examples for jQuery:Width Height

Description

Modifying Width using jQuery

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>
  $(document).ready(function() {
    var docWidth = $(document).width();
    var bottomWidth = $("bottom").width();
    console.log(docWidth);
    $("bottom").css("width", docWidth);
  });/*from   ww w  . j a  va 2  s.co  m*/

      </script> 
      <script>
  var test = $('.bottom').val();
  console.log(test)

      </script>  
   </head>
   <body> 
      <div class="bottom"> 
      </div>  
   </body>
</html>

Related Tutorials