I don't know if anyone knows jQuery but I am trying to change the width of ".affix" if the screen resolution is above a certain size. I got the code but it doesn't seem to work. Any help?
Code:
<script>
$(document).ready(function() {
if ((screen.width>=2048) && (screen.height>=1152)) {
alert('Screen size: 1024x768 or larger');
$(".affix").css({"width":"7%"});
}
else {
alert('Screen size: less than 1024x768, 800x600 maybe?');
}
});
</script>
EDIT: Also I added the resize script. Just for giggles I mesured the before and after speed of the media.html page.
Before: 3.30s
After: 0.92s.
Holly smokes! A reduction of 2.38 S. Thanks, synth3tk!