Hi,
The reason is that the classes are added via javascript (mootools)
according to user actions.
In basic terms this is used on a large list of <li> (delegation is
used ;) ) some of which can be clicked and others not (they are
dates).
The "clickable" dates always need to remain clickable but, as the user
clicks them classes are added/removed according to what is being done.
The class "clickable" doesn't actually have any styling at all (the
other classes that need to be removed do)
The problem is that the "classes" that are being added are not within
the codes control so there is no way (I imagine that they could be
stored in someway as they are added but this may be more complicated
that is actually needed).
So, the problem is that the "clickable" class must always be applied
and the code should just remove the other classes.
In the end I stayed with the simple
"el.erase('class').addClass('base_class')" code, I was just hoping
that there would be some hidden mootools function something like this:
removeClasses('!=clickable')
The suggestions made here in this thread are basically this.
Thanks for thinking about it :)
Chris
On 19 feb, 22:42, Sanford Whiteman <[email protected]>
wrote:
> Hey Chris,
>
> I was just looking at this thread again and wondered what the
> particulars were that necessitated a JS solution for this. Depending
> on the environment, could the "clever" solution have been CSS-only?
>
> http://mootools.net/shell/XdL9T/6/
>
> Not saying this would apply, but I'm wondering what would make it an
> inapplicable approach. All other things being equal, CSS would be my
> first take.
>
> -- S.