Hi, I’m trying to use this javascript code to resize the window, but I must be doing something wrong. It doesn’t call my css pages (cs.css and mobile.css). Any help appreciated. I do have those css pages uploaded.
<body>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script type=”text/javascript”>
$(document).ready(function(){
$(window).bind(“resize”, resizeWindow);
function resizeWindow(e){
var newWindowWidth = $(window).width();
// If width width is below 600px, switch to the mobile stylesheet
if(newWindowWidth < 600){ $(“link[rel=stylesheet]“).attr({href : “mobile.css”}); }
// Else if width is above 600px, switch to the large stylesheet else if(newWindowWidth > 600){
$(“link[rel=stylesheet]“).attr({href : “cs.css”});
}
}
});
</script>
<div id="pagewrap">
<div id="container">
<div id="header">