All Questions
Tagged with jquery-selectors css-selectors
307
questions
0
votes
0
answers
68
views
Get text of selector, put into if statement
I'm trying to get the text of this selector (the upload date of a video in the search result):
uploadedago: #metadata-line > span:nth-child(4)
the text is this: "uploaded x time ago". ...
0
votes
1
answer
19
views
jquery, get the "upper closest" reference from a no direct sibling
look at this structure:
i need to get the "upper closest" hidden input reference from wherever i click
pay attention:
the starting point (where i click) and the target are not direct ...
2
votes
2
answers
309
views
jquery `.find()` use with `:not` selector is missing some elements (the selector is affected by the `.find()` invoking element, but it shouldnt)
problem
I have an element $(elt_Main) (<span id="a">)
I call $(elt_Main).find(selector); on it
With a selector selector = ':not(span span)';
But jquery is not giving out all the child ...
-1
votes
1
answer
77
views
How to delete specific element nodes based on e.g. an empty attribute value of the provided markup?
How does one delete element nodes in case the provided markup comes for example with empty attribute values like in the example below?
E.g. any image element with a missing src attribute needs to be ...
0
votes
1
answer
786
views
Cypress How to select same-named elements
How can I select same-named selectors as I can select in XPath as you can see here?
I select the first element right here.
cy.xpath(`(//div[contains(@class,'dx-scheduler-appointment-collector-content')...
1
vote
1
answer
414
views
How to deselect select input with jquery?
I use this link for select option in my HTML pages(select2 in below).
My cod exist in JSFiddle too.
I want deselect all with JQuery. I use so many code but not working for this option.
var elements = ...
0
votes
1
answer
838
views
Select the last element that is not empty (innerText !== "") of a class with querySelector
I'm try to select the last element that is not empty of a class.
For example, here I would like to select the second element:
<span class="test">A</span>
<span class="...
0
votes
1
answer
195
views
Case insensitive attribute flag in conjunction with :visible selector
This works
$('input[name=email i]')
And this works
$('input[name=email]:visible')
But this doesn't work (unrecognized expression)
$('input[name=email i]:visible')
Why?
0
votes
1
answer
138
views
Javascript nth-of-type and data-attribute (change background images on hover links)
Somehow I can't get the following script to run.
The idea is to swap background images of a div, once the links with its corresponding data attributes are hovered. To be clear, both the links and the ...
0
votes
1
answer
144
views
(CSS / jQuery/ XPath) Selector for getting inner text from sister/sibling node (DOM)
Get text "100" (from "100 meters", displayed by the below HTML),
using selectors only (CSS/jQuery and less preferred - XPath).
From the 2 sister div tags below, identify the 2nd ...
-1
votes
1
answer
1k
views
Puppeteer get innerText of a querySelectorAll
hello I have already a script that's passing through parent elements to get their data, and I'm doing it with queryselector but sometimes the parent has several children that I need. so I should use ...
2
votes
1
answer
755
views
Geb: Web element locator for multi element navigator
I have a html page with an element called Student and it has multiple rows like below:
Student: Foo Bar
Class X
Section A
I was able to locate the Student element using XPath like ...
0
votes
3
answers
136
views
Is there a way to use :first in javascript queryselector?
I have a table containing a list of users and I would like to hide all their duplicates on an event. an example in the image below is hiding the second tr#user-3.
But when I tried using temp1....
-2
votes
1
answer
67
views
jquery does not show hidden div section with css
I'm using elementor to create a photo gallery that appears once the input button is clicked. My problem is that in the hidden div (css display:none) when I use show () or toggle () with jquery the ...
0
votes
1
answer
298
views
capture an html element with data-attribute - javascrit ".querySelector"
const footer = article.querySelector('footer'); //gets the node correctly
then
comments = footer.querySelector('span[data-sigil="comments-token"]'); //doesn't capture the node
this is the ...