title: Yepnope & Modernizr screen.width Conditions
body: <p>I am trying to (locally) use Yepnope with Modernizr to load CSS &amp; JS Files. So I can manage the files better, and code easily.</p>
  
  <p>This is the currently layout:</p>
  
  <pre><code>Modernizr.load([
      {
          test: Modernizr.mq('all and (max-width: 1070px)'),
          yep: '/css/smartdevice.css','/js/smartdevice.js',
      }
      ,
      {
          test: Modernizr.mq('all and (min-width: 481px) and (max-width: 1069px)'),
          yep: '/css/tablet.css','/js/tablet.js',
      },
      {
          test: Modernizr.mq('all and (max-width: 1070px)'),
          yep: '/css/screen.css','/js/screen.js',
      }
  ]);
  </code></pre>
  
  <p>The I am fairly new to JS but I have used jQuery on may occasions. However they all load at once, is there anyway I can load the CSS files based on the px width? (ref above values). I am aware that you could do this server side, however in my position.</p>
  
  <p>It has to be local side in js... I currently code in SCSS. Everything is fine that end, it is just a case of injecting the files/showing file on window width.</p>
  
  <p>I presume that I need to add an if statement, but any help would be greatly provided!</p>
  
  <p>-Neil</p>
  
  <p>P.S I am running locally, on a new iMac using CodeKit &amp; SCSS.</p>