If let's say I require an <img>
to store a certain information(arbitrary snippets of metadata for JS) about that element.
e.g. <img class="slider-img" rel="1" src="image.png" />
So i.e in a slider, I would be able to grab that img with rel="1"
What are some alternatives instead of creating/misusing attributes (xbrowser && backward compatible)?
Here are some I found that's currently being used:
- HTML5, data-*
- rel attribute
- class/id attribute
- custom attributes (Dojo)