Advertisement
imranmodel32

jQuery 100% height

May 9th, 2014
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. jQuery(document).ready(function () {
  2. setDIVHeight();
  3. });
  4.  
  5. jQuery(window).resize(function () {
  6. setDIVHeight();
  7. });
  8.  
  9. function setDIVHeight() {
  10. var theDiv = jQuery('.full_width_area');
  11. var divTop = theDiv.offset().top;
  12. var winHeight = jQuery(window).height();
  13. var divHeight = winHeight - divTop;
  14. theDiv.height(divHeight);
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement