var self = this;
or ... function(){ /* stuff */ }.bind(this)
On Oct 28, 2010, at 8:32 AM, Sean McArthur wrote:
> Just a warning, if you copy pasted that, the var keyword was left out,
> leaving it as a global variable. Nasty.
>
> Also, 'var that = this' is more common for this, since $this is often a
> jQuery pattern for 'var $this = $(this)' inside an each loop.
>
>
>> On Oct 28, 2010 2:19 AM, "Dimitar Christoff" <[email protected]> wrote:
>>
>> > > but i removed the stars and just put $this = this; and now it work
>> > > perfectly.
>> > >
>> >
>> >
>> > Th...
>>
>> Some of us use a _real_ mail client or iphone to read this :)
>>
>> Regards,
>> --
>> Dimitar Christoff <[email protected]>
>>
>> blog: http://fragged.org/ twitter: @D_mitar
>>
>