I searched and found many examples on web, and even here in stackoverflow, but none of them is 100% explained. For those who wants to place a answer with CSS media screen, please don't do that I know about it. But this question is more for IE7+. since it doesn't support "CSS media screen".
This is the example i found:
$(document).ready(function() {
if (screen.width>=800) {
$("link[rel=stylesheet]:not(:first)").attr({href : "style1.css"});
} else {
$("link[rel=stylesheet]:not(:first)").attr({href : "style.css"});
}
});
I am new to jquery, so how to change this script in case if I have 4 different styles for 4 different screen resolutions.
So I would liek to have something like this:
- if screen > 1 && screen < 600
- if screen > 601 && screen < 1280
- if screen > 1281 && screen < 1600
- if screen > 1 1601
Please help me!