Seems like I'm stuck with jQuery selectors.
I would like to have one controller to change for instance css color value of colorsample element and html in value element. The page goes like this:
<span class="controller blue">██</span>
<span class="controller red">██</span>
<span class="colorsample red">██</span>
<span class="colorsample blue">██</span>
<span class="hexcolor red">#FF0000</span>
<span class="hexcolor blue">#0000FF</span>
The jQuery code... Well I don't have working one for this example because I'm stuck. The previous version of this page was generated with template engine, so each element had a unique name and for each controller I had a piece of JavaScript of its own, which worked just fine, but I thought it's stupid and having such double classes seemed to be a good idea to me, but now I can't wrap my head around selecting them, I'm trying something like:
$("span.control").click(function(){
get an element which has the same class as this one, but not entirely, goddamit!
});
So I think I'm doing something very wrong here, what's good approach to making such sort of page? I don't need the detailed code, just a general direction would be great.
Edit: I'd like to keep these ugly symbols, because the page is about pseudographical interfaces.