Without knowing exactly what you're trying to achieve it's difficult to advise whether adopting this kind of approach is the best way or not. However, it's worth pointing out that there are other libraries out there that are successfully using the HTML5 data- attributes referred to by jondavidjon. For an example of this, check out KnockoutJS - fully cross-browser compatible (including IE6).