title: JQuery Attribute to Lowercase
body: <p>I'm stumped why I'm getting this error. I'm sure it's something simple I'm missing:</p>
  
  <p>My HTML5 element with a custom attribute: &lt; div data-id="somevalue"></p>
  
  <pre><code>var dataId = $(this).attr('data-id');
  
  alert(typeof dataId); // returns 'string'
  
  alert(dataId.toLowerCase()); // TypeError: 'undefined' is not an object     
  </code></pre>
  
  <p>Any help would be greatly appreciated!</p>