title: Check block existence by jQuery
body: <p>How do I know if there is a block with class "media" on the page?</p>
  
  <pre><code>if(&lt;div class="media"&gt;&lt;/div&gt; exist in current page){
  //then do something
  }
  </code></pre>
  
  <p>This code doesn't work:</p>
  
  <pre><code>if($(".media")){ //do }
  </code></pre>