binding selector/property together


Une Bévue

Say i've two selector/property :

td#content dl dt {background-color: <#content dl dt color>,

thead tr { background-color: <thead tr color> }

i know how to set colors individually but i'd like rather having a
mechanism doing it "for free" ;-)

that's to say when i set a new color to the selector 'td#content dl dt',
i want some kind of special event handler firing an event in order to
set the 'thead tr' color automatically, using JS of course.

that's what i call 'binding'.

i presume this isn't possible using selectors but rather using DOM
elemnt right ?

then, perhaps i'm dreaming, i could attach a way to fire an event on a
particular 'td#content dl dt' DOM's Element saying
'contentDlDtColorChanged' and attach an event handler to bind the color
of this Element to other elements provided i do have an Array saying
what are the other element to bind ?

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Latest member

Latest Threads