String equality returning false when strings are equal
<p>I have an anchor element :</p>

<pre><code>&lt;a id="buyBtn" href="#" alt="Purchase" title="Buy now" data-enabled="true"&gt;
</code></pre>

<p>When it is clicked, I'm doing this:</p>

<pre><code>enabled = $(this).data('enabled') == "true";
console.log(enabled);
</code></pre>

<p>However, the console shows <code>false</code>. I was initially using <code>===</code> but that was giving false, so I moved to <code>==</code>. </p>
