javascript - How to select first element in each group using jQuery? -
given following html input:
<p>a</p> <p>b</p> <p>c</p> <div>d</div> <p>e</p> <p>f</p> <p>g</p> i can use following select b, c, f , g:
$('p + p') how can select a , e?
$('???').each(function() { var restofgroup = $(this).next('p'); });
Comments
Post a Comment