PDA

View Full Version : The rel attribute and scripting.



jlizarraga
05-19-2009, 12:11 AM
Hi all,

As many other developers before me, I often use the "rel" attribute on links to pass along some data to a Javascript function. Usually this data corresponds to an identifier for a related element - the class name of a group of images to be hidden, the ID of a DIV, etc.

What do y'all use to pass data from elements that aren't links, like a DIV? I usually use a hidden input as the first or last child, but I'm wondering you guys use.

Thanks!

rangana
05-19-2009, 01:02 AM
The ID, class, and/or title attributes would come handy.