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
1
vote
1 answer

jQuery nested loop nextUntil selector

So I basically have the following files and html document jQuery(function () { jQuery(".jx_form_Annuairecommunal").click(function () { jQuery(this).nextUntil().find('.level3').slideToggle(300); return false; }); }); my problem is that im…
0
votes
2 answers

Automatically increment adding a class tag [class-(+1)] between two sets of sibling divs

I was wondering if there was a way to automate/condense adding the specific classes ".header-child-accordion .header-child-accordion-set-(incrementing number)" to sibling divs that exist between two controlling sibling divs that contain the class…
Houghtonator
  • 103
  • 8
0
votes
1 answer

jQuery: Wrap sibling divs of the same class with flexible selector

I'm looking to target all siblings of the same class name together into a container. In this HTML,
deadweig-ht
  • 95
  • 2
  • 9
0
votes
1 answer

jQuery accordion using nextUntil

I have created an accordion using the nextUntil() function. When an accordion item is clicked, I would like to close the previously active item. HTML:

Item 1

...

...

Item 2

user1448031
  • 2,172
  • 11
  • 44
  • 89
0
votes
1 answer

jQuery Next until current state hidden / show of child TR's

Hi all I have a slideToggle() function on a table which uses nextUntil to hide all child elements of a tr with a class of header, this works great. But I need to get the current state of all the child tr's in order to find out if its children are…
futureweb
  • 442
  • 4
  • 12
0
votes
1 answer

Using jQuery to iterate rows until reaching a specific element

I have a table like this:
user1855093
  • 373
  • 1
  • 2
  • 14
0
votes
1 answer

jQuery - toggle selected items

I have a problem with jQuery task. I have to toggle 'ol' context after click on header: My html:

Task

    ...
    ...

Second Task

... My jQuery script: $(document).ready(function() { …
0
votes
1 answer

Scanning text in between two HTML elements and wrapping them with .wrapAll() function

I am working on a forum webpage but am not allowed to edit the HTML within the web page. I want to hide text until hovered over. This is a rough example of the HTML code:
Corbin
  • 77
  • 7
0
votes
1 answer

JS checkbox enable/disable groups of inputs NOT working when inputs wrapped in DIVs

I've been looking for a way to enable/disable groups of inputs with a corresponding checkbox. Finally found one answer that works for me here. However, this only works when the inputs are not wrapped in DIVs. When I add the Bootstrap-classes DIVs,…
cheeseus
  • 369
  • 3
  • 21
0
votes
1 answer

jQuery nextUntil() works weird with comment element

I need help. I have weird problem with jQuery's nextUntil() method. It is not working as I am expecting... I have two comment tags inside my HTML which delimit the elements I am interested in and which I want to get into a jQuery collection. For…
user6748331
0
votes
1 answer

nextUntil hasClass jQuery

Here's my code I want to toggle closest class '.wdm_bundled_item' on '.mainClass_n' What I had tried : jQuery('.mainClass_1').on('click', function(e){ e.preventDefault(); $(this).nextUntil('.codeByBilal').toggle(); }); Working…
Bilal Hussain
  • 994
  • 1
  • 10
  • 25
0
votes
1 answer

JS Query to toggle table rows is not working

I have the following html page $('.header').click(function(){ $(this).nextUntil('tr.header').slideToggle(1000); });
Item Name Yes or No
siva
  • 1,135
  • 4
  • 17
  • 25
0
votes
3 answers

How do I get the HTML content between two IDs?

This is my js code: $("tr[id^=list2ghead_]").each(function(){ j = i+1; id_name = $(this).attr("id"); id_name_lenght = id_name.length; if (i >= 10){ …
Attila Naghi
  • 2,535
  • 6
  • 37
  • 59
0
votes
2 answers

jQuery: Match elements between .class and items // Combine nextAll() and nextUntil()

I have this DOM
c
match me not
c
c with some .wrapper
match me!
match me!
c
Martin
  • 2,007
  • 6
  • 28
  • 44
0
votes
2 answers

Switch::Plain - warning thrown for non-numeric input

This program throws error for redo how could i solve this use strict; use warnings; use Switch::Plain; my %data = (0 => "Enter the number",1 => "UPC",2 => "URL", 3 => "Elastic Search", 4 => "API", 5 => "MONGO", 6 => "TSV", 7 => "SQL", 8 => "JSON",…
user3231692