My site has multiple media queries … Currently I have the following javascript telling the page to reload every time the browser is resized … I’d only like the page to refresh when the media query changes …
<script type=”text/javascript”>
$(window).bind(‘resize’, function(e) {
if (window.RT) clearTimeout(window.RT);
window.RT = setTimeout(function()
{
this.location.reload(false); /* false to get page from cache */
}, 100);
});
</script>
—- I don’t like this because every time you change the browser size at all … it refreshes the page and it’s just bothersome … can’t I accomplish what I want wit hJavascript? if the media query changes … tell the page to refresh?