Topic: Using custom attributes to associate elements
Just wondering how you guys do this --- say you have a script that adds a couple of links below every image on the page. How do you associate each set of links with their image?
I would typical use the "rel" attribute, as my understanding is that this is used to relate one element to another - though it is outside of the HTML 4.01 spec for most elements. So, if I had a link to display the image in a new window, the markup of that link would like this:
<a href="/path/to/img.jpg" rel="imageID">The javascript to open a new window would be attached to the element, but would use jQuery's .click() instead of an "onclick=" attribute. The "href=" would be there for compatibility's sake, just in case for some reason the browser let me insert the markup, but didn't recognize the onclick event properly.

