Not only not related to jQuery, but not related to closures either. :-)
The problem is that setTimeout doesn't accept the additional arguments you
are passing it.
Is there any reason you can't do this:
setTimeout( function() { doStuff( "stuff", 1, 2 ); }, 100 );
That would work in any browser.
-Mike
> i hope someone on this list can help me here, even tho
> my question is not directly related to jquery (duck).
>
> i have trouble getting my closures to work in ie:
>
>
> --snip
>
> //
> // A) this doesn't work in ie (ff & opera grok it)
> //
> setTimeout( function( a,b,c ) { doStuff( a,b,c ) }, 100,
> "stuff", 1, 2 );
>
>
> //
> // B) this works in IE
> //
> var fref = iehelper( "stuff", 1, 2 );
> setTimeout( fref, 100 );
>
> function iehelper( a,b,c ) {
> return ( function() {
> doStuff( a,b,c );
> });
> }
>
> --snap
>
>
> anyone know how to feed that to ie without
> the nasty helper function?
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/