HTML5 data attributes, how to use them and why(blog.mitemitreski.com)
blog.mitemitreski.com
HTML5 data attributes, how to use them and why
http://blog.mitemitreski.com/2012/06/html-5-data-attributes-how-to-use-it.html
2 comments
This is nice and all, but I've yet to find a reason to use data attributes rather than just storing the same data in a js variable. I'd love to be enlightened.
When you store the data in the js variable it does not have the semantic link with the HTML element that describes something.
The idea here is build up your markup to be as meaningful as possible