我有这个示例代码,我想隐藏所有内容行> 5并添加一个链接以显示/隐藏更多。
<div class="wb-allview-cat-cnt wb-col-xs-12 wb-col-sm-12 wb-col-md-3">
<div class="wb-row">
<div class="wb-col-md-12">Content</div>
<div class="wb-col-md-12">Content</div>
<div class="wb-col-md-12">Content</div>
</div>
</div>
<div class="wb-allview-cat-cnt wb-col-xs-12 wb-col-sm-12 wb-col-md-3">
<div class="wb-row">
<div class="wb-col-md-12">Content</div>
<div class="wb-col-md-12">Content</div>
<div class="wb-col-md-12">Content</div>
<div class="wb-col-md-12">Content</div>
<div class="wb-col-md-12">Content</div>
<div class="wb-col-md-12">Content</div>
<div class="wb-col-md-12">Content</div>
<div class="wb-col-md-12">Content</div>
<div class="wb-col-md-12">Content</div>
</div>
</div>
<div class="wb-allview-cat-cnt wb-col-xs-12 wb-col-sm-12 wb-col-md-3">
<div class="wb-row">
<div class="wb-col-md-12">Content</div>
<div class="wb-col-md-12">Content</div>
<div class="wb-col-md-12">Content</div>
<div class="wb-col-md-12">Content</div>
<div class="wb-col-md-12">Content</div>
<div class="wb-col-md-12">Content</div>
</div>
</div>
我尝试了这个,但它不起作用,有点卡在这里
$('.wb-row > div:lt(5)').wrapAll('<div class="first5"></div>');