开发者

jQuery selector equivalent to ~ but reverse

This does not seem to be in the docs of jQuery API, so it probably does not exist, but just wanted to get confirmation from fellow experts.

Is there an equivalent to $('prev ~ next') but for previous siblin开发者_如何转开发gs? (No methods, just selectors)


How about negating the selector?

$('parent > *:not(prev ~ next)')

Working example on JSBin

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜