title: Getting data attribute value in td
body: <p>I am adding data attribute in td something like this :</p>
  
  <pre><code>   &lt;td style="text-align:center;padding: 3px 0;data-id:2;data-env:PL1;"&gt;&lt;img  src="/VendorFeedDevUI/Content/green.png" style="width:25px" alt="Green"&gt;&lt;div&gt;21 Dec 14&lt;br&gt;23:55:00&lt;/div&gt;&lt;/td&gt;
  </code></pre>
  
  <p>When I want to retrieve the same attribute in Jquery I am using below code :</p>
  
  <pre><code>  $(".gradienttable tr td").click(function () {
          showRefreshControl();
          var id = $(this).attr('data-id');
          var env = $(this).data('env')
         });
  </code></pre>
  
  <p>I am trying to use both ways to get data attributes but both are returning undefined.
   Also I am getting td object for <code>$(this)</code> so that is not an issue.
   So what am I doing wrong ?</p>