743
questions
0
votes
1
answer
17
views
Why is this css sibling selector not selecting all the siblings?
li:has(>label) {
background: #0c0;
}
li~li:has(>label) {
border: 4px solid #c0c;
}
<ul tabindex="-1">
<li><input type="radio"/ name="r6a" id="r61a" value="6....
1
vote
1
answer
41
views
HTML XPATH, get aunt/uncle html
I was able to get access to the tag that contained CSCI 12
"//span[contains(., '" + CSCI + "') and contains(., '" + 12 + "')]"
but im stuck trying to access the parents ...
0
votes
0
answers
11
views
Why is the hover state not working when I am using sibling selector to select element? [duplicate]
I am using sibling selector to select another element to style when one element is hovered. But its not working
SCSS code
&__rating-num {
cursor: pointer;
background-color: var(--color-...
0
votes
1
answer
92
views
How to access sibling element using Go with etree XML package?
Given an XML document such as this:
<MasterXML>
<Processes>
<Params>
<ParamName>today</ParamName>
<ParamType>1</ParamType>
...
0
votes
0
answers
16
views
Hover child inside parent and affect other child inside other parent too (sibling parent) [duplicate]
I have question about hovering sibling other child, here is my code:
<div class="parent">
<div class="child">
</div>
<div class="parent">
<...
0
votes
1
answer
41
views
Select a specific HTML sibling according to a common CSS class
I have the following CSS-only form that should display either form A or form B according to the value of a radio input :
<div>
<label for="a">A</label>
<input class=&...
0
votes
1
answer
33
views
Why CSS nesting sibling combinator doesn't apply correctly in following example?
<div class='splash yellow'>
<span>Yellow</span>
</div>
<div class='splash green'>
<span>Green</span>
</div>
<div class='splash red'>
<...
0
votes
0
answers
25
views
Where should I place a Django DRF client module?
My project consists of several components, among them a django app and a streamlit app.
I've designed an API with Django Rest Framework, but I also want an easy way of dealing with it in Python, ...
0
votes
1
answer
68
views
JavaScript .siblings method doesn't work in mobile menu with drop-down sub-links in Wordpress
On website bemchemia.pl I have a Wordpress mobile menu with drop-down sub-links. I want to reveal sublinks using JavaScript .slideToggle only by clicking an arrow and not by clicking a parent link. ...
0
votes
1
answer
37
views
How to select a xpath based on a a sibling number
I have a table where i want to select a detail field based on the name.
For example i want to select a detail field based of the first John in the table (that is row 29).
username coll: usercard-table/...
0
votes
2
answers
54
views
Python import module from a subfolder that imports a sibling module
Folder structure:
ABC
|--db
| |-- __init__.py
| |-- post.py
| |-- common.py
| |-- connection.py
|-- __init__.py
|-- main.py
From main.py I want to import post.py in the db folder.
Inside post....
0
votes
0
answers
22
views
how to make auto-scroll after a click in react
What I need is that after clicking one of the labels in the Header component it scrolls me directly to that component
here is my Home page that contains my main components
function Home() {
return (
...
0
votes
1
answer
721
views
How to link against a target found by find_package() in a sibling CMakeLists.txt?
I have a hierarchy like this:
CMakeLists.txt # calls add_subdirectory() for subdirs in the listed order
+-deps
| +-CMakeLists.txt # calls find_package(Vulkan), a 3rd party lib, present on my ...
0
votes
0
answers
18
views
How can i take the previousElementSibling of all previousElementSibling of one element using JS [duplicate]
I trie to get every the previouselementSibling of a div, but stil have problems with that. There is a way to get this?
garrafinhas.forEach((garrafa,indice)=>{
garrafa.addEventListener('click',(...
0
votes
1
answer
33
views
Why won't the html sibling elements become the same height?
**This is my first question on this website, and I'm pretty much a newbie when it comes to web development, so sorry in advance if this is an incredible dumb question, but I cannot, for the life of me,...
0
votes
1
answer
50
views
Data Transfer Between Sibling Components in Angular
I have two sibling components and a parent components. I want to transfer array data in child-two to child-one.
parent.component.html
<child-one (employees)="employeesFromChild"></...
0
votes
2
answers
66
views
Informix Siblings - Table with repeated Values
I try to get a result like this:
10 Pos 1 = 20
---------------Pos 1
---------------Pos 2 = 50
---------------------------Pos 1
Pos 2 = 30
Pos 3 = 40
---------------Pos 1
---------------Pos 2
CREATE ...
0
votes
1
answer
379
views
how to traverse and get the text value of the sibling of a parent in Cypress
Is there a way to get the text of the sibling of a parent in Cypress?
I tried this but cypress can't find the element of the siblings
cy.get('[role="switch"]')
.parentsUntil('[class="...
1
vote
2
answers
89
views
How to swap the position of siblings in xml using xmlstarlet
I have the following xml file that I would like to swap the positions of the two siblings ("firstname" and "surname"):
From:
<?xml version="1.0" encoding="utf-8&...
0
votes
2
answers
392
views
React keys for sibling components of different types
I encountered a duplicate key warning that I did not expect(because it's not a list of the same type of components) for the following:
<Foo key={'baz'} />
<Bar key={'baz'} />
Why it's ...
0
votes
2
answers
57
views
XSL - How to select all ancestors upto the root, but not the sibling nodes
I have an xml payload
<Root>
<Header>
<Name>B</Name>
</Header>
<Item>
<Id>10</Id>
<Description>Item10</...
0
votes
0
answers
51
views
How to swap the positions of two siblings: using xmlstarlet
How do I swap the positions of two siblings:
From:
<article>
<name>
<firstname>John</firstname>
<surname>Pettterson</surname>
</name>
</...
0
votes
2
answers
314
views
Add a class to all sibling element if one of the element gets that same class when clicked?
const images = document.querySelectorAll(".img_items");
images.forEach((image) => {
image.addEventListener("click", () => {
image.classList.add("select");
});
});
.img_items::after{
...
0
votes
1
answer
75
views
Cannot get the previous item in a for each loop
I have the following code inside a scroll event:
stickySliderItems.forEach( function( item, i ) {
if(i) { // exclude first
let meScrollStart = scroll - sliderWrapperT - ( i * sliderItemH );
...
0
votes
1
answer
62
views
Check if BST node has a sibling
I am trying to check if a node has a sibling using a recursive method, but it seems that my method doesn't go into the tree besides the first two children. So in this example, if I want to check if 6 ...
0
votes
2
answers
117
views
jQuery: how do I move a child element into its 'uncle' element? ie the sibling of its parent?
I want to move a div into its uncle div, or sibling of its parent, and only one step down.
So I want to move class '.child4' into '.uncle', one step down.
<div class="parent" >
<...
0
votes
2
answers
161
views
Need help understanding z-index for nested elements
I need help understanding how z-index of elements is affected by nesting or not nesting elements inside eachother. I have managed to get my code working (which should have a clickable image (image ...
-1
votes
1
answer
57
views
Trying to apply property to all sibling elements in div [duplicate]
trying to change opacity of all other siblings of an item (anchor tag which wraps an image) in a div when user hovers over 1 of the items in the div.
It partially works but when i hover over an item ...
0
votes
2
answers
67
views
Find a table cell and then find the corresponding row cell using Selenium Java
Using Selenium/Java, I have a table where I need to find the country Austria, and then determine which Company is in that country. I found the xPath:
//td[.='Austria']
to Austria in the table, but is ...
-2
votes
1
answer
70
views
Add a new subnode as first sibling in xmlstarlet
I want to insert a subnode as the first subnode sibling using xmlstarlet. I have the following xml file:
src.xml
<xml>
<subnode> Peter Paul </subnode>
<subnode> Peter ...
0
votes
1
answer
25
views
How do you grab/affect a specific sibling in CSS or JS
I'm totally new to coding, i'm trying to make a website where when you hover the mouse over a link the the link (a) becomes bigger, but the tricky thing is that i want the hover to affect the sibling ...
0
votes
1
answer
308
views
Only select the first sibling element with a conditional check
I want to write some css which selects only the first element after textarea and ignoring all elements which are styled with display: none;
I tried something like this but without success:
...
2
votes
1
answer
277
views
Is there a way to STOP selecting after reaching a certain element (using sibling selector)
I am using a sibling selector to select all divs after a certain element. Can I stop selecting after reaching a certain div?
1
vote
2
answers
115
views
Scrape sibling tags and associate as a parent-child relationship
I want to extract content from two different tags using PHP. I want to associate h2 tags with the div tags' content that immediately follows them -- like a parent-child relationship.
<h1>Title ...
0
votes
1
answer
35
views
xslt 1.0 add (conditional) tag only if previous tag is different
I have the following source document;
<instance class-name="Deelnemer">
<attr attr-name="achternaam">
<value>McFly</value>
</attr>
<...
1
vote
2
answers
744
views
How to Find all Leaf Nodes Without Siblings Using BeautifulSoup (Python)?
I want to preprocess HTML documents using bs4 and need a way to find all leaf nodes in an HTML document that do not have siblings.
from typing import List
import bs4
def _is_leaf_node(tag: bs4.Tag) -&...
0
votes
1
answer
128
views
How to scrape a website with many sibling elements, of which the number of them is uncertain? BeautifulSoup Python
I want to scrape video game's release information. The structure of all relevant tags is shown in this picture (the specific case is from this link: https://www.mobygames.com/game/ps2/007-nightfire/...
0
votes
1
answer
73
views
how can mysql5 do the same thing just as oracle connect by prior order siblings by a field?
there are many ways to do the connect by prior with mysql5,
(I have known mysql8 support this query,however, I'm using mysql5),
I had known that I can use find_in_set to realize the connect by prior,
...
0
votes
1
answer
64
views
Indent all elements under headdings by different amounts - CSS
I am trying to indent elements based on the heading tag they are under. I am doing this currently by using the sibling selector:
p{
padding-left: 0;
}
h1 + p, h1 + ul{
padding-left: 1em;
}
...
1
vote
3
answers
55
views
Combinations in long format by group
So I have a dataset of parents and their children of the following form
Children_id Parent_id
10 1
11 1
12 1
13 2
14 2
What I want is a ...
0
votes
0
answers
230
views
React - accessing ref from "unrelated" component
I have a React App with this sort of structure:
const App = () => {
return (
<AnimatedBackground/>
<HomePage/>
)
}
const AnimatedBackground = () =&...
0
votes
2
answers
583
views
Get all elements between element type (h1's) and wrap in div
I have the below structure:
<div class="wrapper">
<h1>Header 1</h1>
<h2>subtitle 1</h2>
<p>aaa</p>
<p>bbb</p>
<p&...
0
votes
2
answers
1k
views
Border around sticky matColumn in matTable
I have a matTable with the first two or three columns sticky. The problem is, due to the border styling already in place for the table, the area where the non-sticky columns scroll under the sticky ...
0
votes
1
answer
662
views
Passing props down to component which are not children
I have to systematize some knowledge.
How can I pass props
ParentComponent
-Child1Component
-Child2Component
-Child2.1.Component
-Child2.1.1.Component
-...
1
vote
1
answer
76
views
How to reference a sibling of a non-trigger element using jQuery?
I am using the jQuery below to validate an input field on click of '#button' and show an alert if the input is empty. However I'd like to do the same for multiple other inputs and would like to avoid ...
0
votes
1
answer
141
views
How to exclude from a contains query all the informations from a child class & after some sibling text?
<root>
<a></a>
<b></b>
<c></c>
<a></a>
<d></d>
<e></e>
<a></a>
<a></a>
</root&...
1
vote
1
answer
5k
views
Is it possible to sibling upwards in 2022? [duplicate]
Referring to this Stackover question from 2009 (Is there a "previous sibling" selector?), it seems that it was not possible then.
Here are two small examples that illustrate the problem
...
2
votes
2
answers
120
views
Binomial heap sibling - linked list reversal
I don't understand the reversal of the list of a node l in a binomial heap:
Node* reverseList(Node* l) {
//return reverseNode(l);
if(l->sibling)
{
return reverseList(l->...
2
votes
2
answers
728
views
jQuery next sibling that has a particular kind of child
My HTML has a container element with many sibling div elements, each of which contains a contenteditable p. These sibling div are "interrupted", however, by other div which do not contain an ...
0
votes
0
answers
51
views
How can I use CSS to modify a preceding div? [duplicate]
So, I apologize, but I really screwed up my question. I modified the code in the snippet.
Hovering the box on the left is not really the issue. Due to the box on the right being a sibling, I can ...