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

Attempt to get next and previous sibling of a node after parsing xml for a specific node using java

I have an xml containing the log of 1000 events where each one has a key, My objective is when a user search for an event key, i should display him the xml of the event node having this key and prepare the info of the previous and next sibling. The…
user2318955
  • 95
  • 10
2
votes
1 answer

Ember subviews table doesn't work Uncaught TypeError: Cannot read property 'nextSibling' of null

When I use table, subviews doesn't work. For example this works fine {{#each}} {{view App.RowView}} {{/each}} But this breaks {{#each}} {{view App.RowView}} {{/each}}
Error says Uncaught…
Tomas
  • 1,377
  • 3
  • 17
  • 32
1
vote
4 answers

jQuery using nextSibling to pull out data

I am trying to only pull out the number "88" in the example below:
  • 5 stars (88)
  • I have tried: var theLi= $('li'); var theNumber = $(theLi.get(0).nextSibling).text(); but nothing comes…
    ToddN
    • 2,901
    • 14
    • 56
    • 96
    1
    vote
    1 answer

    Call to jQuery next() not returning the nextSibling object

    My document contains a text node with a span node after it. In the Chrome inspector, the text node's nextSibling object is the span node. However, calling textnode.next() returns 0 objects. I'm not adding a selector to the next call and seemingly…
    Jack
    • 85
    • 1
    • 3
    1
    vote
    1 answer

    Loop through dropdown menu items to add class to next sibling in vanilla JS

    I am learning JavaScript and am trying to wrap my head around creating a nav megamenu. Basically, each button has a div after it that contains the megamenu content. Hovering OR clicking on the button adds a class to the dropdown (I could also use a…
    pas_oui
    • 87
    • 1
    • 9
    1
    vote
    1 answer

    Tooltip on hover with inline CSS without ID

    A tooltip shall be displayed on hovering over an a tag. Yet, these criteria apply: no "a:hover" should be used, no CSS classes in the head tag, it must be done with inline CSS it must be pure js, no library it must work without predefined IDs so…
    jennab
    • 125
    • 11
    1
    vote
    1 answer

    Access nextSibling when some inputs are inside parent elements

    I have a html table where some are inside some . I would like to focus the next input when current input has a value different from "". However this does not work since input elements are not directly following each other let cells =…
    Gibberish
    • 48
    • 12
    1
    vote
    1 answer

    Find xpath with following-siblings and contains text in Python Selenium

    I know the very basics of using following-siblings but here I have a situation where it looks a bit more complicated. I want to find the element with text Total 6.5 where the header is Total games. How can I do it with following-siblings and…
    bbfl
    • 277
    • 1
    • 2
    • 16
    1
    vote
    1 answer

    scrapy able to check if only next sibling has expected tag?

    Let me post part of html I want to scrape first

    abc

    def

    Dora
    • 6,776
    • 14
    • 51
    • 99
    1
    vote
    3 answers

    How to wrap string which is sibling to strong tag in new tag using jquery?

    In an html like the sample below, I need to wrap the text I need to select part in a span tag with a custom class, but how do I select just that part excluding the content in the strong tags above it, using jquery? random…
    Btdev
    • 159
    • 12
    1
    vote
    1 answer

    BeautifulSoup finding nested tags, children

    I see a bunch of info on finding tags and info within tags, but I can't seem to find something similarly simple. What I'm trying to do is access the text or title of the "a" element(in this case, "United States") in the 3rd "td" element. The problem…
    rchap
    • 91
    • 1
    • 9
    1
    vote
    2 answers

    Replacing nextSibling with other string

    I have the following span element:
    Type here please.
    Name here first…
    Steve Kim
    • 5,293
    • 16
    • 54
    • 99
    1
    vote
    2 answers

    How to wrap previous and next sibling text of
    with div using jquery?

    Following HTML structure is given and cannot be changed:
    ...
    First Text line
    Second…
    user3532637
    • 333
    • 3
    • 16
    1
    vote
    1 answer

    Find next sibling at the same level if exists

    I'm curious whether is it possible to get next sibling only when is there some in the same level. Current: 90 Increment : 5
    End Date/Time : 06/08/2015…
    Milano
    • 18,048
    • 37
    • 153
    • 353
    1
    vote
    1 answer

    How can i access next sibling's proprties/attributes of element using angularjs?

    I am trying to access the class of button which is placed next to paragraph. As soon as the focus gets on paragraph the class of button should change. Please see HTML the code below :
    email :
    Parul Abrol
    • 483
    • 5
    • 7