Last active
August 3, 2016 19:19
-
-
Save AlexJWayne/88f391457441dd8065c71726e95bb2f4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var resize_interval; | |
// resize AFTER resize finished, and don't do again for a second or so | |
window.onresize=function(){ | |
// Window was resized, so cancel any previous deferred resize handlers. | |
clearTimeout(resize_interval); | |
// Call this every 750ms | |
resize_interval = setTimeout(function () { | |
// Do the crap you need to do on resize. | |
$('body').css('min-height',$(window).height()+'px'); | |
if ($.isFunction(jQuery.fn.body_height)) { | |
$('div.body_height').body_height(); | |
} | |
}, 750); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment