[英]wrapAll and andSelf not wrapping self element
I'm using the code below: 我正在使用以下代码:
$('.graph-img').each(function(index) {
$(this).prev('h2,h3,h4,h5,h6,p').prevUntil('.graph-img').andSelf().not('h1').wrapAll("<div class='prevent-break'>");
});
It's wrapping all the elements, but excluding .graph-img
that this currently refers to. 它包装了所有元素,但不包括当前引用的.graph-img
。 Any ideas why? 有什么想法吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.