Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Script for reload only different Browser Width
//Create the VAR for get browser size
var windowWidth = $(window).width();
$(window).bind('resize', function(e) {
//Verification with my VAR windowWidth is different Window size
if(windowWidth != $(window).width()){
//Create a delay for reload
if (window.RT) clearTimeout(window.RT); window.RT = setTimeout(function() {
this.location.reload(false);
}, 200);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.