title: JQuery detect if a tag is self closing
body: <p>Is there a way to detect if a tag is self closing with JQuery like an image tag?  Something dynamic not just an image tag.</p>
  
  <pre><code>if ($('.selector')[0].tagName.toLowerCase()=="img") {
      // do something
  }
  </code></pre>