In the following code there is “function(i)”, but “i” hasn’t been declared anywhere previous to this statement.
ul.css({width: 10, overflow: 'visible'}).retarder(100, function(i){
i.css('visibility', 'visible').animate(
{width: ul[0].wid,left:-50},
{duration: 500, complete : function(){
ul.css('overflow', 'visible');
}}
);
});
It looks like it could be similar to a c++ “this” statement. Is that correct at all?
iis just a function parameter that is passed byretarderfunction to the anonymous function.What it does is:
and callback is defined via anonymous function:
So that
iis definition of the parameter of the anonymous function.