I am using Mootools for a long time - and i found a strange behavior
when trying to set an event to a native element fx effect
I am doing set to onComplete event in built-in "tween" effect on an
element:
Line number On/Off | Expand/Contract | Select all

var el = document.id('someelement');
el.set('tween',{
    onComplete: function(){
        alert('done');
     }.bind(this);
});
el.tween('width',100);


The code works ok in Mootools 1.2 and 1.3 except that in mootools 1.3
the onComplete event behaves like addEvent - so each time i call to
this function that sets the onComplete event to the tween element
effect - the event is added to the queue of the onComplete event and i
see multiple "done" alert each time i call this function
In mootools 1.2 the onComplete event override the last one - which for
me is the right behavior cause i am using "set" not "add" or "append"
and i want each time to get a new onComplete!
Does anyone knows if it's a bug or just how it is meant to be in
mootools 1.3 ?

Thanks

Reply via email to