Hi, I trying to use one of two style sheets depending on screen size but it is not working. Here is the code:
<script type="text/javascript">
if(screen.width>= 900){
document.write('<link href="main.css" rel="stylesheet" type="text/css" />');
}else {document.write('<link href="small.css" rel="stylesheet" type="text/css" />');
}
</script>
It disables the style sheets altogether. Not sure why.
Any suggestions?
Thanks