title: Check if Attribute('id') Exists in jQuery
body: <p>How can I check if an attribute Id exists in jQuery?</p>
  
  <p>I searched around and found that this should work:</p>
  
  <pre><code>if ($(this).attr('id').attr('id'))
  {
  
  }
  </code></pre>
  
  <p>I still get this error: TypeError: Object gauge1 has no method 'attr'</p>