> Anyway, this way is just a function around the same basic logic... not
> really reaching the "cleverer" mark. :)

the 'clever' i could think of  without involving garden gnomes was this:

Element.implement({
    removeClassesExcept: function(klass) {
        return this.hasClass(klass) ? this.set("class", klass) : 
this.erase("class");
    }
});

http://mootools.net/shell/Wpqum/1/ - tested in FF 2.5 and IE7. back to
gardening now... 

regards,
-- 
Dimitar Christoff <[email protected]> - http://fragged.org/

Reply via email to