How to access HTML5 data attributes with jQuery
Source code
<div data-attr-name="Attr Value">Div</div>
<script>
$(document).ready(function() {
$("div").data("attr-name");
});
</script>
More code answers
Comments
Log in to leave a comment.


