The only issue I take with this is:<p>> <i>So maybe we add another data-liked="true" attribute. ACK! Just typing this all out is giving me a headache!. Congratulations, your code is now spaghetti, your data is strewn out in the DOM and your logic is tied to a particular layout of HTML elements.</i><p>For certain super-rich highly complex webapps, sure -- and believe me, I've done those.<p>But most of the time, it's actually quite a reasonable way to go about things. Most of the time, your DOM/HTML/code <i>is</i> tightly coupled, and uncoupling it just adds complexity. And it's only spaghetti if you let it be -- there's nothing inherently spaghetti-like about using data- attributes with jQuery events and simple DOM manipulation, if it accurately and intuitively reflects user actions and site usage. It's really only when you get to multiple views of the same data, and data that changes in real time, that the game changes.<p>The kind of blanket assetion that "<i>congratulations, your code is now spaghetti</i>!" really comes across like a bad case of "a little knowledge is a dangerous thing". Or maybe just big-time exaggeration...