I already saw some tools which stores some state or data inside element's attribute:
<div clicks="2" id="myDiv" class="some-class">
but it's invalid in some doctypes.
At all. Is this a good solution for stateful elements? If not, some advice will be appreciated.
Thanks in advance.