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

Traversing from Bookmark Hashtags (#bookmark) in jQuery?

I am having trouble traversing from a bookmark has tag in jquery. Specifically, the following HTML:

1st Post

this is 1st…

0
votes
0 answers

Get element in container that is not child, sibling or ancestor according to additional selector filter

I have a structure that repeats recursively like this : HTML:
Brett Weber
  • 1,839
  • 18
  • 22
0
votes
1 answer

supporting multiple dialog boxes on web page with jquery through traversing the DOM

I have tried every combination that I can think of and for some reason can't get this code to run properly.The dialog method is correct. When i call ".dialog" directly after click without trying to traverse, everything runs fine. If I have multiple…
Full Stack Alien
  • 11,244
  • 1
  • 24
  • 37
0
votes
1 answer

Update specific div inputs with chosen table inputs

Good day everyone, I need some jQuery traversal help (I can never get it exactly right). In my example below, when the user clicks on a table row (it is highlighted) this should fill the matching inputs/selects of the div#editField (being Contact…
triplethreat77
  • 1,276
  • 8
  • 34
  • 69
0
votes
4 answers

How to use jQuery nth-child to color every other div in parent and rest on new parent?

Have to support IE8 so no just css. I am trying to color the odds and evens of each parent div and reset the color when it hits the new parent div. Hope that makes sense. Here is an example:

Content

(White BGColor this…
RooksStrife
  • 1,647
  • 3
  • 22
  • 54
0
votes
2 answers

How to search deep nested elements without going through nested copies of top element?

Example is I have a 4 unordered lists on a page:
0
votes
1 answer

Values of certain fields that precede a specific button class onClick are undefined?

Thought to test something like this to get the values of fields that precede a repeating UpdateButton's click, but it logs undefined values in the browser console var $prevID = $(this).prevAll('.UpdateStory').first(".storyID"); var $prevStory =…
StackThis
  • 883
  • 3
  • 15
  • 45
0
votes
2 answers

Get all Select Elements in a Form by referencing $(this) instead of $("form select")

I'm currently getting all the Select elements that exist in a form with the following: $("form").submit(function(event) { // gather data var data = GetSelectData($("form select")); // do submit $.post($(this).attr("action"), data,…
DaveDev
  • 41,155
  • 72
  • 223
  • 385
0
votes
3 answers

Navigating to a specific element with jQuery

I have a table, trying to figure out how to navigate to the 3.35 and add columns. Is there a way to specify which TD i want to navigate to with jQuery? Thanks ahead of time!
Petrogad
  • 4,405
  • 5
  • 38
  • 77
0
votes
1 answer

target first sibling of every group of elements with similar class

I need to target every first div.bar. I went through many ways but with no success with jQuery, although it seemed easy at first. I need this in order to wrap all the div.bar after, but this I can do with .wrapAll() afterwards.
Nirs
  • 45
  • 8
0
votes
2 answers

Wrap ach group of elements with class starting with same characters

Here is a fiddle of what I have so far. I want to wrap all groups of 'OK' starting classes into their own:
I figured one possibility could be to take the first element of each group, then run a nextUntil() until it finds…
Nirs
  • 45
  • 8
0
votes
2 answers

Setting attributes for the first column's contents with jquery

I have the following table which is loaded dynamically into a
. Now I am trying to traverse into the table as to disable all the input fields in the first column titled "index". How would I go about that? What I have come up with is the…
0
votes
2 answers

jquery Getting index of parent element within another element

I have a series of inputs listed within table cells like spreadsheet. I'm simply trying to get jquery to figure out which column they're in when I start typing. I'd like to to this without putting identifiers in the columns…
Jeremy L.
  • 853
  • 8
  • 15
0
votes
3 answers

How to find specific elements with jQuery?

I have a table with checkboxes.
1 Bob
6 Izya
Finkelson
  • 2,921
  • 4
  • 31
  • 49
0
votes
2 answers

Insert div containers by class numbers

I'm trying to get some div boxes to be inserted at specific positions. Here's my first attempt: $('[class*=order-]').each(function() { /* 1. Store info */ var orderClass = $(this); console.log(orderClass); /* 2. Find the insert number…
Marc P
  • 606
  • 1
  • 11
  • 26