title: Retrieve boolean data from data attribute in jquery
body: <p>I am trying to retrieve a data attribute of type Boolean from  an html DIV element , however it is always returning false when the string is converted to boolean .</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;div id='test' data-return="true"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>JS</p>
  
  <pre><code>isreturn_str = $('#test').data('return');
  isreturn = (isreturn_str === 'true');
  if (isreturn) {
      document.write("It is true");
  } else {
      document.write("It is false");
  }
  </code></pre>
  
  <p>output</p>
  
  <blockquote>
    <p>It is false</p>
  </blockquote>
  
  <p><a href="http://jsfiddle.net/neilghosh/494wC/">http://jsfiddle.net/neilghosh/494wC/</a></p>