jQuery选择器上下文 [英] jQuery selector context
本文介绍了jQuery选择器上下文的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在下面的代码中,是什么,这个
是什么意思?
In the following code, what does , this
mean?
var popup = $(popup, this).css('opacity', 0);
推荐答案
选择器中的第二个参数是搜索的上下文。 $(a,b)
与 $(b).find(a)
相同。
The second argument in the selector is a context for search. $(a,b)
is the same as $(b).find(a)
.
更多信息可以在 jQuery()找到,jQuery(选择器,[上下文]) 。
More information can be found at jQuery(), section "jQuery( selector, [ context ] )".
这篇关于jQuery选择器上下文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文