Skip to content

Instantly share code, notes, and snippets.

@alexadark
Created February 20, 2014 16:57
Show Gist options
  • Save alexadark/9118385 to your computer and use it in GitHub Desktop.
Save alexadark/9118385 to your computer and use it in GitHub Desktop.
jquery:sticky footer2
function jqUpdateSize(){
// Get the dimensions of the viewport
var width = jQuery(window).width();
var height = jQuery(window).height();
// jQuery('#jqWidth').html(width); // Display the width
jQuery('.bodywrapper').css('height',height-45); // Set the height
};
jQuery(document).ready(jqUpdateSize); // When the page first loads
jQuery(window).resize(jqUpdateSize); // When the browser changes size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment