Skip to main content

All 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". ...
user avatar
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 ...
pinale's user avatar
  • 2,174
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 ...
Nor.Z's user avatar
  • 1,091
-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 ...
Poetiq's user avatar
  • 21
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')...
Barış Can Ateş's user avatar
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 = ...
henrry's user avatar
  • 595
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="...
Myk Ado's user avatar
  • 63
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?
John K's user avatar
  • 897
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 ...
Schakelen's user avatar
  • 115
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 ...
Alan's user avatar
  • 1
-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 ...
Ethanolle's user avatar
  • 1,205
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 ...
user6348718's user avatar
  • 1,385
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....
iamafasha's user avatar
  • 860
-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 ...
Mat Bre's user avatar
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 ...
pinale's user avatar
  • 2,174

15 30 50 per page
1
2 3 4 5
21