On Apr 14, 2009, at 6:34 PM, Ricardo wrote:
If you insert these attributes server-side, the page will not validate and might trigger quirks mode in the browser. If you are adding them after load, there's no harm in it, but I bet using data() would be faster for lots of elements.
I was under the impression that adding DOM expandos with JavaScript could cause memory leaks in IE unless you scrupulously clean up after yourself (setting the property to null or some such). Using data() avoids this problem.
--Karl ____________ Karl Swedberg www.englishrules.com www.learningjquery.com