I have this code which allows me to change the style sheet when the browser is re-sized:
$(window).resize(function () {
var width = $(window).width();
var height = $(window).height();
if ((width <= 1280) && (height <= 800)) {
$("link[rel=stylesheet]:not(:first)").attr({ href: "Styles/Home-1024.css" });
}
else if ((width > 1280) && (height > 800)) {
$("link[rel=stylesheet]:not(:first)").attr({ href: "Styles/Home.css" });
}
});
and it works fine but i am trying to change the style sheet again when the browser returns to its original size.
i was missing a double greater than so instead of this :
i used this and it worked: