Hi, simply use a local variable:
return this.each(function() { var parent = $(this); $(selector).each(function() { // do whatever you want with 'parent' }); }); by(e) Stephan 2009/2/26 mahakala <mpy...@googlemail.com>: > > Hi all, > I'm new to jQuery and just got stuck on a problem where I'm having 2 > nested $.each methods and need to access this of the parent each loop, > is this possible at all?? > > return this.each(function() { > > $(selector).each(function() { > // how do i get reference to this in parent each?? :-( > > }); > > }); > > > any help appreciated > M >