Is it possible of getting the width/height of browser each time BEFORE the resize() is triggered?
$(window).resize(function() {
});
This is due to I'm calculating the difference before/after browser has resize().
You would have to store the previous value, a little like this
var prevHeight = 0;
var prevWidth = 0;
$(document).ready(function() {
prevHeight = $(window).height();
prevWidth = $(window).width();
});
$(window).resize(function() {
var currentHeight = $(window).height();
var currentWidth = $(window).width();
//do difference stuff
prevHeight = currentHeight;
prevWidth = currentWidth;
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With