Access HTML5 data attribute with jQuery

    obviously one can access HTML5’s data attribute super easy in jQuery
    [javascript]
    <span data-sku="SKU123456">My Product</span>

    $("span").data("sku");
    [/javascript]

    Leave a Reply