Skip to main content
1 vote
0 answers
110 views

[EDIT] I'm sorry for my previous post, which was not very clear. I hope the updated question is less ambiguous! I created the following js method, which allows retrieving, in a descending manner, all ...
Quentin's user avatar
  • 11
1 vote
1 answer
46 views

Hi I want to make this code work for each element in the page but it only works for the first one. I can't make querySelectorAll() work. Only the first button works and the others don't. Thanks to all....
Dani Kh's user avatar
  • 13
0 votes
0 answers
40 views

I have a series of repeating HTML blocks on a page (over 200 times) that need to have some content tweaks made via some simple javascript. What I've done is use querySelectorAll to target all of the ...
Chuwa Feet's user avatar
0 votes
1 answer
233 views

Let's say I have an element and I want to select the next matching sibling. Normally, in css I'd be able to write <some selector for this element> ~ <selector for sibling>, but the sibling ...
Aayla Secura's user avatar
1 vote
4 answers
133 views

Let's say that instead of looking at the ID, I want to select all a.href elements that contain (a piece of) this example: if document.url is "www.youtube.com". var youtubeID = document....
Mediamash's user avatar
1 vote
3 answers
105 views

Tried a lot of solutions (like these https://dev.to/dailydevtips1/javascript-loop-queryselectorall-results-j6) but can't get the loop to work in GTM/Google Tag Manager. My working script - not very ...
Mediamash's user avatar
0 votes
1 answer
34 views

I have HTML: <form name="form" .. <input type="text" name="title1" id="title1" class="f_title" value="smth LV"> <input type=&...
ima's user avatar
  • 3
-2 votes
5 answers
101 views

I have an app that allows user to generate text with HTML code in the following format: <h2>User generated Dynamic Data 1</h2> <h3>User generated text 1.1</h3> <h3&...
mendicant_bias's user avatar
-1 votes
2 answers
188 views

Sorry if my question is really for newbie level... I have a 3 level list to build a menu, but I don't want to use href. I would like to use a specific attribute instead and call a javascript function ...
jeromebg's user avatar
0 votes
0 answers
484 views

I have the following Tampermonkey custom script: // ==UserScript== // @name Hacker News // @namespace https://news.ycombinator.com/* // @version 2024-02-02 // @description try to take ...
sudoExclamationExclamation's user avatar
2 votes
1 answer
175 views

How can I use previously cached selectors with certain aspects of querySelector() ? For example, I have this HTML / JavaScript: let L1, L2, L3; L1 = document.querySelector('#L1'); L2 = L1....
cssyphus's user avatar
  • 40.4k
0 votes
2 answers
83 views

I have 2 click listeners set up, these handle showing a modal and removing a note. These listeners use event delegation and is set up on parent container. The Note is rendered afters when users inputs ...
Kevin Rodrigues's user avatar
1 vote
4 answers
185 views

I read about unobstrusive JavaScript and how Javascript should be not explicitly placed inside HTML code. Fine! But I have these hundreds of search results where I placed click events in the HTML ...
Marcos Camargo's user avatar
0 votes
1 answer
112 views

I made a TamperScript at work (in Chrome) that gathers a list of elements from a webpage. The script is used by many people without errors. But on one person's workstation it fails with the error: ...
Bambax's user avatar
  • 3,010
-1 votes
1 answer
162 views

I am trying to grab an element in the DOM that is created in the future. To simplify, When the user uploads an image by clicking on an upload button, a div is created in the DOM, which has a class ...
Al Amin Khan's user avatar

15 30 50 per page
1
2 3 4 5
31