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 traversing table and replace its contents

I have this table and I have to traverse using Jquery: …
Deval Shah
  • 1,094
  • 8
  • 22
0
votes
3 answers

Select last element before my current element that has one class with jQuery

I want to select with jQuery the last element that it has pu class before the element with which I launch this event knowing that I there are a lots of elements before and after the current that have this class Here is an example :
simonTifo
  • 307
  • 3
  • 12
  • 29
0
votes
1 answer

Dynamically Add and Remove Table Rows

I am both adding and removing table rows with jQuery. I can add rows easily, but am having trouble removing ones that were created. You can view the page in action here: http://freshbaby.com/v20/wic/request_quote.cfm, with the relevant code pasted…
justacoder
  • 2,684
  • 6
  • 47
  • 78
0
votes
1 answer

Jquery tree traversal not working

through tree traversing i am trying to capture the immediate submenu for the item clicked. I have used .parent().siblings() to get the element. But somehow it is not working. Please help me to resolve the issue. Here is the html mark-up.
0
votes
2 answers

jQuery move element to end but keep variable updated

how can I move element to end but keep the variable updated without traversing again? var pbUL = $('ul'); var pbLIs = $('li'); pbLIs.eq(0).appendTo(pbUL); pbLIs = $('li'); // not good... simple problem - probably simple soluction, but I have no…
Ron
  • 3,975
  • 17
  • 80
  • 130
0
votes
3 answers

jquery traversing table

When i click on a link "zmeniť pozíciu", i want to save its closest img to variable.
Free Text Weighting
1 Nadpis Eiusmod…
Michal
  • 325
  • 2
  • 7
0
votes
1 answer

How to wrap multiple div blocks with different class names in jQuery?

Possible Duplicate: How to wrap DIV tags with different class names in jQuery? I have the following HTML blocks repeated in the document
My first div
My second…
Max
  • 4,965
  • 17
  • 49
  • 64
0
votes
1 answer

jquery dom traversal via parent/child

I have several instances of (".wrappingdivclass > .hovercontents > .hovercontent2") on a page.. all need to behave independently but call the same jquery. As you can see its two blocks of identical HTML... how would I go up/down the dom tree to…
0
votes
2 answers

How to get the content of a span element using jQuery?

When a text is clicked on my page, I want to get the value of the nearest (going upwards) span element with the class of 'network_ip'. Here is my code:
Mr B
  • 3,980
  • 9
  • 48
  • 74
0
votes
2 answers

Creating elements and manipulating them with jQuery outside of the dom

I tried looking at this post which has an almost identical title but despite trying the answer that appeared suitable, my code still isn't working. I'm creating an element outside of the dom like this: var e = $('
nmford
  • 151
  • 2
  • 12
0
votes
1 answer

Jquery to update inputbox after clone

I have the following code: $(document).ready(function($) { $(".dispadd").click(function(event) { event.preventDefault(); $('#hiddenrow') .clone() .removeAttr('id') .show() .appendTo(…
Rick
  • 441
  • 1
  • 3
  • 15
0
votes
3 answers

Navigate into elements with JQuery

I have this elements hierarchy :
How can I access to span element via input whom I know id please ? I think I have to use…
Olivier J.
  • 3,115
  • 11
  • 48
  • 71
0
votes
2 answers

click link from alternative element with jquery

While there is a lot of good resources on traversing the DOM with jQuery I am not having any luck on my example. On my site www.smithgrey.co.uk I have a series of thumbnail galleries all which have a 'section title' div in front of them. What I…
0
votes
1 answer

Travsering dom document - jsfiddle

Ive set up a fiddle here at JSFiddle! My quetions is how do is use the the name of my input to traveserse up to the nearest TH, and get its content? In the fiddle case "www.sverigemotrasism.nu" should be fetched. I have tried and tried many…
8bitcat
  • 2,206
  • 5
  • 30
  • 59
0
votes
4 answers

jQuery and JQM - using closest with filter to get index

I have a piece of html that, when JQM is done with it, looks like this (simplified):
Services
1 2 3
10
11