Posted By

eme_dlr on 05/25/11


Tagged

div resize window browser jquery set height


Versions (?)

Set div height same as window (resize on window resize)


 / Published in: jQuery
 

  1. $(function(){
  2. $(window).load(function(){ // On load
  3. $('#div').css({'height':(($(window).height()))+'px'});
  4. });
  5. $(window).resize(function(){ // On resize
  6. $('#div').css({'height':(($(window).height()))+'px'});
  7. });
  8. });

Report this snippet  

You need to login to post a comment.