我想知道如何隐藏所有元素,直到找到第一个<hr/>
. 然后循环应该停止
<div class='row-father'>
<legend> Title here </legend>
<div class="row-fluid">...</div>
<div class="row-fluid">...</div>
<hr/>
<div class="row-fluid">...</div>
<div class="row-fluid">...</div>
<div class="row-fluid">...</div>
<div class="row-fluid">...</div>
<hr/>
<div class="row-fluid">...</div>
<div class="row-fluid">...</div>
<hr/>
</div>
...
$('.row-father').find('*').each(function(){
if ($(this) != '<hr/>')
$(this).hide();
});