您的位置:首页 > Web前端 > Node.js

How to get the nearest parent node given a text node in jQuery?

2015-02-07 02:32 567 查看
http://stackoverflow.com/a/2879467/2177408

Any element or text node is a
Node
,
which has a
parentNode
property.
You don't need jQueryfor this but you can turn the parent into a jQuery object:
$(textNode.parentNode)...
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: