[TYPO3-core] RFC: Feature #7251: Toggle Menu in new backend
Steffen Kamper
steffen at sk-typo3.de
Wed Jan 23 20:39:31 CET 2008
"Ingo Renner" <ingo at typo3.org> schrieb im Newsbeitrag
news:mailman.1.1201114986.14719.typo3-team-core at lists.netfielders.de...
> Steffen Kamper wrote:
>
> Hi Steffen,
>
>> In doku of prototype i found this depriciated:
>> element.addAttribute('class','xyz');
>> but i didn't found a new working one, so i used it. toggleClassName had
>
> too complicated ;-)
> We don't need another div, just have a look at prototype's
> Element.addClassName, removeClassname, and hasClassName.
>
>
I saw that, but it looks more complicate to me
element.addAttribute('class','xyz');
does the class change in one step.
other way:
if(element.hasClassName('class1') {
element.removeClassName('class1');
}
element.addClassName('class2');
vg Steffen
More information about the TYPO3-team-core
mailing list