Questions tagged [nextsibling]

A read-only property of javascript that return sibling text after target element.

The Node.nextSibling read-only property returns the node immediately following the specified one in its parent's childNodes list, or null if the specified node is the last node in that list.

66 questions
24
votes
3 answers

Portability of nextElementSibling/nextSibling

I'm currently writing an accordion and running into the same problem as described in nextSibling difference between IE and FF? - specifically differences between Microsoft's nextSibling / nextElementSibling and that implemented by everyone else. For…
symcbean
  • 47,736
  • 6
  • 59
  • 94
8
votes
1 answer

Working with previousSibling and nextSibling to set attributes

so since I started studying JavaScript I've been reading this book called Learning JavaScript by Tim Wright. In this book I found a chapter about how we can move and target elements in the DOM tree and one of them is making use of properties which…
csalmeida
  • 528
  • 7
  • 26
8
votes
1 answer

Get Next Sibling gameobject(transform) Method in unity3d C#

looking a method or a Library for something like this: GameObject nextBrotherNode= gameObject.transform.getNextSibling();
Zen Of Kursat
  • 2,672
  • 1
  • 31
  • 47
7
votes
6 answers

javascript nextsibling function

This PARAGRAPH has two nodes, Node One, and …

Wasim A.
  • 9,660
  • 22
  • 90
  • 120
4
votes
1 answer

Why cannot I select the next DIV sibling using pure JavaScript?

I have two div elements with one button in the first div as follows.
Below is my JavaScript…
O Connor
  • 4,236
  • 15
  • 50
  • 91
3
votes
1 answer

How can I "Map" the up/down arrow keys to Tab/Shift Tab?

For my React App, all I want to do is take the current functionality of Tab and Shift Tab, but have the Up/Down arrows do same thing. I know you can kind of emulate this behavior with Reacts "useRef" and "focus", but my App will have dynamically…
Geoff D
  • 51
  • 3
3
votes
3 answers

Javascript: select next sibling of an element and change its class by click (without using ID´s)

I want to add a CSS class name to the next sibling of an element as soon as I click on it to get a simple show/hide effect I have the following html output and I don't have element-ID's.
John982
  • 41
  • 1
  • 1
  • 6
3
votes
3 answers

Get next element with class which is not sibling

I want to traverse through pages and toggle active class through them. How should I do this without using set class? HTML
Peyman Mohamadpour
  • 17,954
  • 24
  • 89
  • 100
3
votes
1 answer

Can I make a repeated jQuery next() by for loop?

I wanna select some sibling elements. So I used jQuery .next() but I don't know how to repeat. // Repeat 3…
jiae
  • 80
  • 7
2
votes
1 answer

How can I web scrape certain words that don't have an attribute attached to them?

Firstly, I would like to point out that I am very much a beginner to web scraping. I am just beginning a project that scrapes data off of https://coinmarketcap.com. Currently, I am focused on scraping the names of the cryptocurrencies (ie. Bitcoin,…
2
votes
2 answers

Assign Extracted text from HTML table to Variable for later use -- Beautiful Soup / Python 3.7

I have the below code working perfectly to dynamically search for a specific text within a HTML table source code and pull the nextSibling of the row where the specific text was found. Current Code r = requests.get(url) soup = BeautifulSoup(r.text,…
2
votes
0 answers

Javascript nextSibling vs nextElementSibling

Greetings fellow coder, I'm reading a book about JS ( beginners edition ) . I am on previous and next sibling properties. I'm a little confused. I'm trying to run this demo code: var el = document.getElementById('two'); When I…
2
votes
1 answer

XPath. How to get element with next sibling of concrete type?

I have following elements:
So how to get //div/table with next element table?
Kovpaev Alexey
  • 1,725
  • 6
  • 19
  • 38
2
votes
2 answers

BeautifulSoup find nextClass

So basically. I have 2 classes. One is date of shoe release. Another is shoes released in that date. However they're entirely two different classes. So I am trying to scrape from these classes. "month header" which has all the dates. And the next…
Benji
  • 137
  • 3
  • 15
2
votes
2 answers

Find next element out of parent using jQuery

I've the following DOM structure:
Manish Jangir
  • 5,329
  • 4
  • 42
  • 75
1
2 3 4 5