Questions tagged [nextuntil]

A jQuery function that get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.

A jquery function that get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed. docs

<dl>
  <dt id="term-1">term 1</dt>
  <dd>definition 1-a</dd>
  <dd>definition 1-b</dd>
  <dd>definition 1-c</dd>
  <dd>definition 1-d</dd>
  <dt id="term-2">term 2</dt>
  <dd>definition 2-a</dd> <!-- Selected -->
  <dd>definition 2-b</dd> <!-- Selected -->
  <dd>definition 2-c</dd> <!-- Selected -->
  <dt id="term-3">term 3</dt>
  <dd>definition 3-a</dd>
  <dd>definition 3-b</dd>
</dl>
$( "#term-2" ).nextUntil( "dt" )
// select any element after #term-2 to next "dt"
33 questions
0
votes
3 answers

nextUntil() and childElements

the elements:
// <-- checked
// <-- checked
// <-- unckecked
// <--…
0
votes
2 answers

jQuery: Find nextUntil() any heading element

I am trying to find all the contents until the next heading title. Heading title could be h2, h3, h4, h5 or even h6. That said, in between main and the heading it could have many other elements or a single element so counting them until the next…
jQuerybeast
  • 14,130
  • 38
  • 118
  • 196
-2
votes
1 answer

jQuery: Wrap elements with nextUntil()

Match only in here

I don't if or how many dl+table live here.

Text
1Abc
Text
Martin
  • 2,007
  • 6
  • 28
  • 44
1 2
3