title: check if html attribute exist and has right value with jquery
body: <p>Is there a better way for checking an attribute for:</p>
  
  <ol>
  <li>it exist. so value must be false if attribute doesn't exist</li>
  <li>Value is correct (boolean)</li>
  </ol>
  
  <pre class="lang-js prettyprint-override"><code>var isOwner = false;
      if ($(selectedItem).is('[data-isOwner="True"]') || $(selectedItem).is('[data-isOwner="true"]')) {
          isOwner = true;
      } else {
          isOwner = false;
      }
  </code></pre>
  
  <p>Now I need to check for <em>'True'</em> and <em>'true'</em>...</p>
  
  <p>Thanks</p>