Resize event not getting called or probably some other issue
<p>I am trying to have jQuery append a Wide.css stylesheet to the page whenever the browser window is over 1360px and remove the file whenever it is less then that.</p>

<p>Currently, the main stylesheet only has wrapper defined with gray background and 900px width and the other, Wide.css, has background red and wrapper width 1300px.</p>

<p>The problem I am facing is that it works fine with refreshing the page, however, whenever the window is simply resized, the function does not get called(or there is some other issue with the code).</p>

<p>The script:</p>

<pre><code>$(document).ready(function () {
    stylesheetToggle();
    $(window).resize(stylesheetToggle);
});

function stylesheetToggle() {
    if ($('body').width() &gt; 1360) {
        $('&lt;link rel="stylesheet" href="Content/Stylesheets/Wide.css" type="text/css" /&gt;').appendTo('head');
    } else {
        $('link[href=Content/Stylesheets/Wide.css]').remove();
    }
}
</code></pre>
