PDA

View Full Version : (Twin)TriggerField toggle triggerClass



eztam
27 Oct 2010, 1:09 AM
Hi,
I've got a TwinTriggerField, containing a trigger which should toggle it's state (should be compatible with more than two states).
I tried to do following:


onTrigger1Click: function(f, t, e) {
this.triggers[0].removeClass(classToRemove);
this.triggers[0].addClass(classToAdd);
}

This has no effect on my triggers css class. I think this is because of the over/out/click class toggling.

But how can I add/remove/toggle the "base" trigger class?


Thanks eztam!

Animal
27 Oct 2010, 2:01 AM
Could be just the specificity of your CSS rules. Check that.

eztam
27 Oct 2010, 3:12 AM
Oh sorry, the class was added to the wrong trigger, so I missed it.