Posted By

iroybot on 08/09/12


Tagged

js jquery html5


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

frentsel2
BrockSamsom


Access HTML5 data attribute with jQuery


 / Published in: jQuery
 

obviously one can access HTML5's data attribute super easy in jQuery

  1. <span data-sku="SKU123456">My Product</span>
  2.  
  3. $("span").data("sku");

Report this snippet  

You need to login to post a comment.