Questions tagged [jquery-traversing]

Functions in the Traversing category in the jQuery JavaScript library allow for the selection and manipulation of element(s) based on the function description.

A complete list of supported traversal functions is available at jQuery's API documentation: Traversing. Subcategories of this category are Filtering, Tree Traversal, and Miscellaneous Traversal.

Functions like .children(), .prevAll() and .each() are included in this category.

162 questions
0
votes
2 answers

jQuery Select All Checkbox; Deselect parent when child checkbox unchecked

I've created a JSFiddle. When viewing it, check a parent and you'll see the children are selected. Ideally, when a child is deselected, I'd like for the parents to become unchecked, this could be one or two parents depending on what was deselected…
HPWD
  • 2,232
  • 4
  • 31
  • 61
0
votes
1 answer

Difference between nextAll() and siblings() in jQuery

nextAll() in jQuery gets all the siblings of each element in the set of matched elements optionally filtered by a selector whereas siblings() Get the siblings of each element in the set of matched elements, optionally filtered by a selector. I want…
0
votes
1 answer

Traverse up until find attribute id

I have to traverse up until element have id attribute. My problem here is element is not definite and sometimes parent have id attribute, sometimes grandparent have id attribute like that goes on. I try like var id =…
Swashi
  • 59
  • 7
0
votes
1 answer

jQuery traverse down multiple layers deep to set checked value

How do I use jQuery to traverse to this element deep in my table? #adminreview > thead > tr > th:nth-child(1) > div > div > div.checkbox-container > div:nth-child(1) > input and set the input's checked property to false? I'm using this nice…
michaelf
  • 469
  • 6
  • 20
0
votes
2 answers

Why this JQuery selector with closest() does not work here?

I try to use JQuery to highlight the current main menupoint. It works clicking the main menu points, but not working in case of clicking on a sub menu point. Main menu points are always visible and submenu points are hidden with css. The 'li' tags…
Lumpy79
  • 25
  • 5
0
votes
1 answer

Matching everything between two HTML elements with jQuery

I have empty elements that can be anywhere in the DOM. They have a specific class and id like and . So I can identify the starting point and the endpoint via the id. I now want…
0
votes
3 answers

jQuery each iteration problem

James
  • 5,942
  • 15
  • 48
  • 72
0
votes
6 answers

jquery show only next div with same class

I'm trying to do a sequence of steps with jquery but I'm failing to achieve the result I want. I have 3 steps, with a class of .wiki-step- plus a number. my javascript is this one: function stepping() { var stepButton = $("a.button"); var…
valerio0999
  • 11,458
  • 7
  • 28
  • 56
0
votes
3 answers
0
votes
2 answers

jquery selector issue

I have a div which in jquery's document ready I append - using $("#div id").append('html text') syntax - with 10 or so more div child elements. once this is done I try to check the content of the child divs via alert($(".classname")); and it comes…
citronic
  • 9,868
  • 14
  • 51
  • 74
0
votes
1 answer

Traversing to specific children - jQuery/Javascript

I have the following DOM structures given below and I would like to get to the hyperlink buttons (a) in both the scenarios. I have made both the header's (header1 and recordHeader1) clickable (cursor:pointer). So if I click on say anywhere (say if I…
Neophile
  • 5,660
  • 14
  • 61
  • 107
0
votes
1 answer

Shorter version for DOM traversing

I have a click event on a .child class. I want to reach the .productHolder div from this class. Now I have a really long selector. I was wondering if there is a shorter version for doing this. HTML:
0
votes
2 answers

Jquery making real-time input checking

I am trying to write a script that validates user input. Like: letter length more than 5 or password and reentered-password match. But how can I get which input box in the form was clicked? I used $(function() { $('#register…
Ercan
  • 2,699
  • 10
  • 53
  • 60
0
votes
0 answers

Can find single input box and disable it. unable to do for full tr.What is wrong?

var element = ""; var aval_qty = ""; $.each(data.response.available_stk, function (a,b){ aval_qty = '.a'+b.id_itm; $(aval_qty).each(function(i, obj) { …
satish kilari
  • 746
  • 4
  • 21
0
votes
2 answers

jquery traversing and text replace

Given the following html code
Department File Maintenance