Questions tagged [jquery-selectors]
Selectors can be used in jQuery to match a set of elements in a document. Most CSS selectors are implemented, as well as a set of custom ones.
jquery-selectors
9,006
questions
-1
votes
2
answers
38
views
How can I select HTML elements which are rendered after DOM
I want to select OKBTN
let main = document.querySelector("#main");
let okBtn = document.querySelector("#ok");
function myAlert(title,msg,icon){
let card = "";
...
0
votes
1
answer
28
views
How do I make a toggle Panel not be open by default? the toggle is made on JavaScript within the HTML
So I've got a page in which the user can find a "?" toggle to read information on how to use the page.
However, whenever the page loads (or reloads/refreshes) the toggle panel opens up (as ...
0
votes
1
answer
28
views
Finding closest input in same cell multiple spans
I am having a hard time getting the closest input to the button clicked. Everything is on the same table cell. The button is inside a span and the input is inside 3 level span? Please see for ...
0
votes
1
answer
23
views
Error when using jQuery selectors pulled from a JSON configuration
I have a JSON object with jQuery selectors and values inside it. Special characters inside the selectors have (I think) been properly escaped. Here is what the JSON looks like:
var config = [{
&...
0
votes
1
answer
35
views
Making a variable element from existing element / querySelector doesn't accept Variables
Im trying to select a child div from an array with the variable x
This is only a sketch to illustrate what I'm trying to do:
var x= 0;
trackN = document.querySelector( .track :nth-child(x))
But ...
0
votes
0
answers
85
views
app.js:55 Uncaught TypeError: Cannot read properties of undefined (reading 'value')
i have checked the node list before adding the 'fetchValues' function to make sure that it have a value , but when i add the function , this error shows up:
Uncaught TypeError: Cannot read properties ...
0
votes
1
answer
60
views
Why does MutationObserver not detect nodes after a random point?
I am building a Tampermonkey user script. My actual script is a lot more complex but I am able to reproduce with the following example.
My script needs to work on Hacker News website.
For example on ...
0
votes
0
answers
19
views
tinymce setContent and setMode Operation
I'm Having a Problem with tinymce,
Editor textarea is located under a div object,
tinymce.get("#DV_Gorev_Genel_Liste #TXA_GorevTanimlamaPencereAlani_Genel_Aciklama").setContent('');
tinymce....
0
votes
1
answer
33
views
In Javascript, how can I querySelector to get the innerHTML excluding one of the inner sibling divs
I have the following html:
<body>
<span class="comment">
EXAMPLES:
<p><i>Example 1</i> - <a href="https://example.com/1">...
0
votes
0
answers
81
views
How can I press Tab key and Enter key on browser using browser's console?
I want to press 2 buttons on the website one by one (by console code) but the click code doesn't work on one of them.
So instead, I am trying to make console code that presses Tab key and Enter key ...
0
votes
0
answers
33
views
"OR" in var selector
I've trying to customise a script that normally triggers a GTM tag to populate a form's hidden field with a variable (session_url_campaign).
Here is the script:
<script>
(function () {
var value ...
0
votes
0
answers
34
views
I would like to change the execution order of my event listeners but they are interdependent [duplicate]
I am new to javascript and html coding. I am writing an html form with a javascript code in it which allows the user to add a list of venues and write information about them. When a venue is added by ...
1
vote
2
answers
48
views
Contains to return multiple values
I am using $('label:contains('something'); to get the label that contains 'something' in it
it works perfectly fine but I want to be able to handle more than one label how to do it
example:
HTML:
<...
0
votes
0
answers
51
views
What should be used instead of document.queryselectorAll() in React?
I have a working piece of code (a customised version of MUI DatePicker component).
I'm using document.querySelectorAll in 2 places in my code.
I'm asked to remove the usage of query selectors from the ...
1
vote
1
answer
36
views
How can I select a DOM element, which name is changing [duplicate]
I have this DOM elelement, where the part of the name of the menu [ v15rco8kc2 ] is changing for every call of the document. How Could I use a joker in the QuerySelector?
document.querySelector("#...
0
votes
0
answers
38
views
Can't get value from child element using JQuery [duplicate]
I am trying to get the value of the third <p> element by referring to the id of its parent (id="pickup-searchbox"), but first I'm referring to the class of the first chid (class="...
-1
votes
2
answers
115
views
Iterate Form with queryselectorall to put input value into array
I Have an html page and function is JS
I noticed that myForms is a NodeList with two elements, form is 0 or 1, How do I retrieve the input values for each form?
I also tried with
var query = '' + ...
0
votes
0
answers
59
views
How to use Javascript to expand Google PAA section?
I want to get the questions and answers from People Also Ask section of google using javascript (but inside a vb.net cefsharp browser using executequery). The section needs to be clicked to be ...
0
votes
1
answer
139
views
JavaScript Click does not work on Google translate image
I try to code JavaScript extension for translate an image which is in the windows clipboard.
Site page web: https://translate.google.fr/?hl=fr&sl=auto&tl=fr&op=images
An image is already ...
0
votes
1
answer
138
views
3cx change bubble button style in Wordpress functions.php - move up an async button and styling it after waiting fetch for async dom created
I have been struggling with the moving up of the chat bubble overriding my theme bottom login/out web app bar for 2 days:
Tryed to:
modify in Wordpress the child style.css and the functions.php
The ...
0
votes
1
answer
28
views
Find nodeList nested <span>
I'm trying to web-scrape for the first time in order to get the best deal out of my holiday.
(My intention is to have a Telegram Bot that everyday checks a specific day in the hotel calendar and sends ...
0
votes
0
answers
180
views
ApplyTransaction Remove from AG Grid React does not remove the row from the DOM right away. document.querySelector still returning something
Hi I am trying to disable a button based on if a css class name is present in the DOM or not, using document.querySelector(); If document.querySelector('invalid-cell') returns a value the button ...
0
votes
1
answer
22
views
if we have two html elements named button how we can select the specific element and add style to it using javascript using query selector
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="style.css">
<title>...
0
votes
1
answer
18
views
Active class for single class element jQuery
I have these buttons which are actually p elements in a grid and they all have the same class. I would like to change the color of the p element which the user clicks on. How can I add an active class ...
0
votes
1
answer
26
views
Why this jQuery selector does not work for me?
I am trying to start an action everytime anything on the webpage else than specific object is clicked (menu "tree horizontal lines" button with class called "navbutton"), like this:...
1
vote
1
answer
41
views
jQuery next Input in table
I have a series of input and select elements in a table:
<table id='tbl-edit-company' class='tbl-form tbl-contact-form'>
<tbody>
<tr>
<td><...
-1
votes
1
answer
28
views
I am trying to write my stored input into a text element on the webpage
I am trying to write an extension that will search the webpage for a specific text element and write my const into it.
Some additional context: The process flow is essentially;
Pop up prompts user to ...
0
votes
1
answer
75
views
querySelector returns null even though id exists
I am using node.js and typescript to build a website. In one part of the code I am trying to acces an Element with the ID 'likeForm'. This did not work.
This is the furthest I got:
in movies.ts:
...
0
votes
1
answer
104
views
Call Back IntersectionObserver function for different different id with a single function
I want to create a entrance effects for element when it's on view port for different ids. I have 3 different ids #fadeAppear #slideAppear #zoomAppear with different css property. I want to call a ...
0
votes
1
answer
29
views
Targeting child elements belonging to a specific class using JQuery :nth-child(n) selector
I am trying to apply some CSS classes on a specific html button using JQuery. The button that I am trying to target is the 2nd button in the #left-well div. All the buttons in my html have the class ...