[jQuery] Re: OOP's *this* messing up $().each()'s *this*

2007-05-28 Thread arnaud sellenet
You can declare a reference to your main object. It will be usable in all deeper scopes : function classname() { var mainvar =new Array(example,array); var myreference = this; this.functionname = function() { $('td.number').each(function(_i) {

[jQuery] Re: OOP's *this* messing up $().each()'s *this*

2007-05-28 Thread Brandon Aaron
In this particular snippet you just need to reference mainvar instead of this.mainvar. ... $(this).html(mainvar[_i]); ... If you declared mainvar like this: ... this.mainvar = new Array(example, array); ... Then you would just need to create a reference to the original 'this' object to

[jQuery] Re: OOP's *this* messing up $().each()'s *this*

2007-05-28 Thread [EMAIL PROTECTED]
Works great, thanks