title: jquery check if img has src
body: <p>I have a carousel of images that are dynamically populated. There is potential for up to 5 images, however, if there is less than 5 images I need to introduce some if statements in my code. Is it possible using jQuery to check if an img src is blank?</p>
  
  <p>For example, if I have an image with class "optional" but it has no url, is there a way to detect this with jQuery?</p>
  
  <pre><code>&lt;img class="optional" src="" /&gt;
  </code></pre>