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

jQuery Traversing and simple code?

Okay, before I ask this question. Let me explain my goal: I want to write as little code as possible, and still be able to have tons of functionality at the same time. I have coined this as 'beautiful code' to myself and colleagues. Here's the…
0
votes
1 answer

Change variable attribute name

I want to change attribute names with variables. However, I can't wrap my head around how to access just the constant. In the following example, I want to change all attribute names starting with "monkey" and change them to "banana", but leave the…
Marc P
  • 606
  • 1
  • 11
  • 26
0
votes
2 answers

jQuery Traversing with .not

I've coded a column of several red boxes each containing a smaller grey box. When a grey box gets clicked, I want all red boxes to animate left by 100px, except for the red box containing the grey box that was clicked. I know that I need to use some…
Uncle Slug
  • 853
  • 1
  • 13
  • 26
0
votes
1 answer

DOM traversing troubles

I have table:
Rezerwuj Name Manufacturer ProjectName Name …
szpic
  • 4,346
  • 15
  • 54
  • 85
0
votes
1 answer

Traversing with jQuery and matching elements

I am cloning a div (with an h3, a paragraph, and a clickable tag line) on the click of the tag line and appending the div to my sidebar. There is several divs with this same structure and when a div has already been cloned I want to make sure that…
Gabriel Ferraz
  • 592
  • 6
  • 26
0
votes
2 answers

Jquery: Toggle closest parent element using .on("click")?

Given HTML such as
Hosts:

Hi !

How are you ?

What ever.

An other child & element type !
How to make that a click on a child element toggle the class="grey" of the…
Hugolpz
  • 17,296
  • 26
  • 100
  • 187
0
votes
1 answer

JQuery Traversing inside div's

0
votes
2 answers

traversing element content with jquery and greasemonkey

I have a question about traversing a newly created element with jquery and greasemonkey. I have this javascript snippet: var content="some html string" var el = $( '
' ); el.html(content); GM_log(el.html()); The html string I added to the…
nick2k3
  • 1,399
  • 8
  • 18
  • 25
0
votes
2 answers

Change element property based on placement of another element - jQuery

I'm having trouble working out how I can target a super annoying edgecase I'm having. How can I target the h1, that comes after the cite tag? As cite is wrapped inside the p tag, I don't know how to traverse out to target it. The gap between the…
Ollie
  • 1,104
  • 7
  • 24
  • 45
0
votes
2 answers

Jquery Traverse DOM

I have the following code:

Representing

This chunk is repeated a number of times. The number of…
Jon Chubb
  • 29
  • 10
0
votes
2 answers
0
votes
2 answers

On-Click Traversing through specific nodes of JSON

So I have a modal. that when triggered fetches. 1 JSON file. The JSON has multiple nodes; however, I just want to target the last 4 nodes and omit anything before it. The name of these nodes are: post_a, post_b, post_c, post_d. They will always be…
Armeen Moon
  • 18,061
  • 35
  • 120
  • 233
tag?
I have the following string:
Fname Lname Campaign Manager
marknt15
  • 5,047
  • 14
  • 59
  • 67
0
votes
1 answer

parent of clicked item get the child

I am trying to travers up the tree and then down again but I do not seem to be able to combine the parent method and a regular selector. here is what I am trying, I need to get the parent to establish the element that is being clicked and then…
LeBlaireau
  • 17,133
  • 33
  • 112
  • 192
0
votes
4 answers

jQuery traversing on the same level

Example of my code:
MORE
    Erik Hellman
    • 269
    • 1
    • 2
    • 11