$(selector).each(function(){
  alert(this);
}.bind($(somethingElse));

sets somethingElse as the 'this' inside of the each function, instead
of the item in the array.  That's what spradeepkumar was referring to
by controlling scope.

On Nov 27, 7:14 am, RobG <[EMAIL PROTECTED]> wrote:
> On Nov 27, 11:32 pm, spradeepkumar <[EMAIL PROTECTED]> wrote:
> [...]
>
> > If you are particular in using this...prototype has got
> > bind methods with which you can control your scope....
>
> The value of a function's this keyword has nothing to do with scope,
> it is set by the call.
>
> --
> Rob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to