title: How to use javascript conditionally like CSS3 media queries, orientation?
body: <p>How to use javascript conditionally like CSS3 media queries, orientation?</p>
  
  <p>For Example I can write css for specific</p>
  
  <pre><code>@media only screen and (width : 1024px) and (orientation : landscape) {
  
  .selector1 { width:960px}
  
  }
  </code></pre>
  
  <p>Now I want to only run some javascript if it match the same conditions</p>
  
  <p>like</p>
  
  <pre><code>@media only screen and (width : 1024px) and (orientation : landscape) {
  
  A javascript code here
  
  }
  </code></pre>
  
  <p><strong>I have a external javascript for example <code>http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.4.min.js</code> and it should be only run on specific screen size and orientation</strong></p>