[thelist] tying events and styles together in JS?

Nik Schramm n at industriality.com
Wed Feb 19 10:56:01 CST 2003


On 19.Feb.03 17:14 Tom Dell'Aringa wrote

> Is there some way either in JS or otherwise that I can specify this
> behavior for a TR instead of each time in the actual tag? It would be
> even better if I could do it only for the TRs where a certain class
> is.

Alternatively, you could use JS to change the className for all table
rows in your document onload and save yourself a whole lot of code and
trouble.

I have an old demo file online at http://dev.nae.de/tablerows/ , which
demonstrates how to do this for all table rows. It works in IE and Gecko
browsers, possibly in others.

If you wanted to target specific table rows only, you would need to
insert a check for whatever identifies the desired subset of table rows,
such as a CSS className, inside the JS function. If you need help with
that, let me know.

--
/nik




More information about the thelist mailing list