Skip to main content

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
-1 votes
2 answers
34 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 = ""; ...
Pawan Lal Rathore's user avatar
0 votes
1 answer
27 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 ...
Ren's user avatar
  • 1
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 ...
joanb's user avatar
  • 317
0 votes
1 answer
22 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 = [{ &...
JosephStyons's user avatar
  • 58.1k
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 ...
Dr_ Buhu's user avatar
0 votes
0 answers
84 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 ...
Abdi Med Amin's user avatar
0 votes
1 answer
56 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 ...
sudoExclamationExclamation's user avatar
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....
Halil İbrahim AYHAN's user avatar
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">...
sudoExclamationExclamation's user avatar
0 votes
0 answers
80 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 ...
Robert's user avatar
  • 1
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 ...
Xavier Wallach's user avatar
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 ...
Clara's user avatar
  • 13
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: <...
Amado's user avatar
  • 383
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 ...
Anser Waseem's user avatar
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("#...
Walter Schrabmair's user avatar

15 30 50 per page
1
2 3 4 5
601