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

How to access the element using "this"

I need to access a SPAN tag with in every DIV tag so i used this following code $("DIV").click(function(){ $(this + "SPAN").show(); }); Is the above code is correct? Its not working for me! Its showing nothing too.. Please help…
praveenjayapal
  • 37,683
  • 30
  • 72
  • 72
0
votes
1 answer

change html object inside cloned object

supose i have tr like this :
*
mehdi
  • 9,262
  • 11
  • 35
  • 35
0
votes
1 answer

Traverse Up multiple times

Currently i use $(this).parent().parent().parent().parent().$(".collapse"); i tried to use .closest(".playerul") but it didn't find anything. Passing a selector within the parent didn't work out either. I have to go like this:
Minzkraut
  • 2,149
  • 25
  • 31
0
votes
3 answers

hide all td in a table excluding the clicked one

I have a fieldset in which I have a table with multiple tr and td . I have to hide all the td upon click event except the td that is clicked inside the fieldset. I tried traversing to the parent tr of the tds that have to be clicked and then set the…
rawatdeepesh
  • 584
  • 8
  • 31
0
votes
1 answer

Move (each) element to first-matched element

I've been twisting my brain over this for a while now: I need to get a jQuery function to move each instance of .THIS after the first-following .THAT. I broke it down to this simple HTML example:
Asitis
  • 382
  • 3
  • 17
0
votes
3 answers

How to remove or add a class on checking or unchecking a checkbox?

Desired Behaviour On changing the checked status of a checkbox, I want to remove or add a class. I have the functionality for the logic working, but am having trouble traversing and targeting a specific li and making style changes. HTML
user1063287
  • 10,265
  • 25
  • 122
  • 218
0
votes
2 answers

Table Traversing with Jquery

I have a cart page where the quantity is not the correct quantity as the products are sold in bulk (1, 10, 100 items). What I am trying to achieve is getting the number of items in the pack, multiply by the quantity and display the total number of…
0
votes
2 answers

Using Jquery to expand all answers below question

I am trying to work out how to expand all answers below a question when an .allopener span is pressed. Users can currently expand each answer individually, but not all at once. Any tips would be much appreciated. There would be many items on a…
Adrian33
  • 281
  • 5
  • 16
0
votes
1 answer

Catch dynamically generated element

I am using javascript to generate a div witch i want to use Perfect Scrollbar and i cannot catch it with its id to initiate the plug in. I know how to do it if i want to bind an event but i am confused about this. Here i generate the div var search…
stathisg
  • 13
  • 8
0
votes
1 answer

How can I retrieve the li tag of an unordered list and put these tags into an array using JQuery?

I am pretty new in JQuery and I have the following problem. Into a page I have the following unordered list:
0
votes
1 answer

using jquery to traverse dom for scraping data

I am working with the node phantom simple https://github.com/baudehlo/node-phantom-simple. It has made scraping the dom very simple. I am allowed to use jquery and I am getting into the data-table library. Here is the code that I started with …
Winnemucca
  • 3,309
  • 11
  • 37
  • 66
0
votes
1 answer

How to get the parent's sibling's text with JQuery

I am trying to get the text of the link directly before another link (parent's sibling), but I keep getting "undefined." I can't figure out what I need to change to get the anchor tag's text rather than "undefined" Here is my HTML:
0
votes
4 answers

Get the text inside span tag of dynamically generated table?

I have a dynamically generated page of an enterprise application. The data is inside table structure. I need to access a value of span tag inside this table.
1a
ksg
  • 3,927
  • 7
  • 51
  • 97
0
votes
1 answer

Jquery XML traversing filter date range

I am trying to find multiple nodes in an XML file which have a node attribute ex. like position[validFromDate=2015-01-05] and where the date is within the range of two dates (30 day windows). In addition I need to have a logic operand OR as in…
petrusjak
  • 45
  • 11
0
votes
3 answers

listening for click event on dynamic content and determining parent element

I have a wall of posts that are dynamically generated, and with it I am trying to reproduce the same functionality Facebook has when you click the comment link it puts the focus on the textarea below it. However, I can't seem to get a hold of the…
user3832583
  • 371
  • 4
  • 19