Created
December 10, 2015 01:11
-
-
Save chrdesigner/5637d7f539e284d740b9 to your computer and use it in GitHub Desktop.
Script for reload only different Browser Width
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
//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