Window resize script not calling css codes

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=&#8221;text/javascript&#8221;>
$(document).ready(function(){
$(window).bind(&#8220;resize&#8221;, resizeWindow);
function resizeWindow(e){
var newWindowWidth = $(window).width();
// If width width is below 600px, switch to the mobile stylesheet
if(newWindowWidth < 600){                 $(&#8220;link[rel=stylesheet]&#8220;).attr({href : &#8220;mobile.css&#8221;});  } 
// Else if width is above 600px, switch to the large stylesheet             else if(newWindowWidth > 600){
$(&#8220;link[rel=stylesheet]&#8220;).attr({href : &#8220;cs.css&#8221;});
}
}
});
</script>

 <div id="pagewrap">
<div id="container">
	<div id="header">


Since I can’t post links yet, suggest you do a Google search for “javascript code to resize window” as there’s numerous solutions you can view.

But, could you let me know if there’s some mistake in the code I posted, which might cause it not to work? I wanted to use it for media queries, especially for

IE 6 etc, the idea being to call a separate stylesheet for screens smaller than 600 px wide. Thanks.