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 :
>
> Hi all,
> I'm new to jQuery and just got stuck on a problem where I'm having
return this.each(function() {
var parent = $(this);
$(selector).each(function() {
// use 'parent' here
});
});
On Feb 26, 12:38 pm, mahakala wrote:
> Hi all,
> Is there a way to get reference to parent's this in nested each method
>
> return this.each(function() {
>
> $(select
Thanks for the report, Pete. It sounds like my suspicion was correct -
jQuery applies the :gt() to the *entire* result set at that point, instead
of the immediately preceding selector.
Iin other words, this selector:
.itemList .item:gt(9)
is interpreted as (using double parens to indicate g
3 matches
Mail list logo