Jquery expanding and resizing event - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:resize

Description

Jquery expanding and resizing event

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://code.jquery.com/jquery-1.6.3.js"></script> 
      <script type="text/javascript">
    $(function(){/*from   w  w  w.  j a  v  a  2  s.co  m*/
$(window).resize(function() {
    $('#size').html(
        ' Window width: '+$(window).width()+
        '<br> Window height: '+$(window).height()
    );
});
    });

      </script> 
   </head> 
   <body> 
      <div id="size"></div>  
   </body>
</html>

Related Tutorials