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
2
votes
2 answers

jquery nextUntil has element

I have a bunch of elements like this:
I need to check whether or not there's a table element in between the divs, and if so do something. $('div').each(function () { …
Mark
  • 32,293
  • 33
  • 107
  • 137
2
votes
1 answer

find value of nearest input field

Please help on the code in this fiddle. What I'm trying t achieve is to get the input value from a field nearest to the delete button. : http://jsfiddle.net/w9g3e8mb/11/ function deleteTheCtrl() { var ctrl_name =…
pacific ray
  • 55
  • 2
  • 8
2
votes
2 answers

IN Jquery , how do I go up a parent node?

I just want to go up a parent node, so I can do a .find inside that parent node. In a sense, I want to .find a sister.
TIMEX
  • 259,804
  • 351
  • 777
  • 1,080
2
votes
2 answers

Find all elements that have a certain data attribute (regardless of value)

I have a form with a bunch of text elements, some of which have a data attribute set. I want to loop through all the elements that have that attribute, extracting the attribute. I've created a fiddle here. var textInputs = $(':text'); alert('found '…
Jeff Dege
  • 11,190
  • 22
  • 96
  • 165
2
votes
1 answer

jquery insertbefore for multiple elements

I have also created a jsfiddle to demonstrate my problem. I need to have the time before the title.
  • Title 1

    Speaker 1

    Time 1

  • Title…

2
votes
1 answer

jquery add numeric class to an element based on current class of another element

I have the following HTML
  • 1
  • 2
  • etc...
And the following jquery function I am using to append "buttons" for traversing "up" or "down" the list, while only "showing" the current…
vibe9
  • 33
  • 3
  • 11
2
votes
3 answers

jQuery Tree Traversing to select next div

Looking for a way to accomplish populating a div with jQuery, traversing.. which I'm no good at. My code has a series of 6 boxes and then a content box.. another 6 boxes and a content box like so:
david_o
  • 45
  • 5
1
vote
2 answers

How to show sub-menu in a circular navigation menu on click of an element in jQuery

This question follows on from a previous question which can be found here: Need to fadeIn each circle 1 after the other with jQuery Basically now when the 'Climate Change and energy' circle is clicked, I need to hide all the other circles apart from…
1
vote
3 answers

How to check if html element has some html tag by jquery?

The case : should select object example: function getDomPart(text,htmlTag){ return $(text).closest(htmlTag).get(0); } var text1='some text + html elements '; var text2='
some text + html elements …
Ben
  • 25,389
  • 34
  • 109
  • 165
1
vote
2 answers

jQuery Traversing - how to get the right element

Here is my html code. for a lot of reasons this cannot change:
1
vote
4 answers

jQuery: Selecting a link one level up from a lower level link

I'm working with an unordered list of links that has two levels:
1
vote
2 answers

jQuery traversing using closest

HTML: …
user686924
  • 157
  • 1
  • 4
  • 11
1
vote
1 answer

jQuery: TabAccordion - How to find the next element in DOM from clicked this

I want the user to click on a link in a certain area and the next element with the class .zutdescr in the DOM should open/close. Unfortunately I have problems selecting the right element I build a simple Example for better…
Bill Bronson
  • 530
  • 2
  • 9
  • 24
1
vote
3 answers

how to set onchange function to each append div element

I have a button that adds a new div with a select tag, every option has custom attributes. my problem is when I create a several divs the function only refers to the last div I have created when I am trying to change the first select tag the…
dror shalit
  • 318
  • 2
  • 12
1
vote
1 answer

using jQuery to traverse the DOM

Given the following html DOM: When the edit is clicked, I'd like to get the somevalue. A) Would I use .parent().parent().find()…
HPWD
  • 2,232
  • 4
  • 31
  • 61
1 2
3
10 11