$(''同一元素的类',element)是什么意思? [英] What does $(''class for the same element', element) mean?

查看:112
本文介绍了$(''同一元素的类',element)是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不会理解以下语法:

var dir = $("a.store").parents("table")[0];
var stores = $("a.store:has(b)", dir);

store将包含什么?

"$("a.store:has(b)", dir);"是什么意思?

推荐答案

它将返回与css选择器("a.store:has(b)")相匹配的dom元素集合,这些选择器是所存储dom元素的子元素在"dir"变量中.

It will return a collection of dom elements that match the css selector ("a.store:has(b)") that are children of the dom element stored in the 'dir' variable.

这篇关于$(''同一元素的类',element)是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆