我有一個事件列表,onClick元素展開,他們應該做相反的第二次點擊。這是我的小腳本不起作用的部分。爲什麼不??Mootools set className
window.addEvent('load',function() {
$$('.eventlistitempassive').each(function(item) {
item.addEvent('click',function() {
$$('.eventlistitemactive').set('class', 'eventlistitempassive block');
item.set('class', 'eventlistitemactive block');
});
});
$$('.eventlistitemactive').each(function(item) {
item.addEvent('click',function() {
item.set('class', 'eventlistitempassive block');
});
});
});
見行動腳本在 http://hoch3.cc/index.php/aktuelles.html 感謝, PB