Lopez
Lopez

Reputation:

jQuery selector context

In the following code, what does , this mean?

var popup = $(popup, this).css('opacity', 0);

Upvotes: 14

Views: 10022

Answers (1)

Scott Evernden
Scott Evernden

Reputation: 39926

The second argument in the selector is a context for search. $(a,b) is the same as $(b).find(a).

More information can be found at jQuery(), section "jQuery( selector, [ context ] )".

Upvotes: 50

Related Questions