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

来源:互联网 发布:时间同步软件apk 编辑:程序博客网 时间:2024/05/20 19:48

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)...
0 0