What am I doing wrong? there are 7 pictures with pre-made IDs from "img1" to "img7" function changeWidth() { let b = 50 let k = 0
When an customer opens a new tab or goes away from the current sites tab, I'm trying to insert an promo message in the tab of a browser that flashes back and fo
Most of the research I have done in regards to jest testing unit testing and/or integration testing is all heavily geared towards React. But I am not using reac
What are the possible reasons for document.getElementById, $("#id") or any other DOM method / jQuery selector not finding the elements? Example problems include
I have this weird bug that whenever I want to add an item/card to the list and I cycle between clicking the text input and then clicking outside of it, the list
It's my first time trying to learn Firefox extension development. To get started, I'm trying to make a simple extension that alters some parts of the youtube.co
according to the DOM Core, Attr objects inherit the Node interface, but since they are not actually child nodes of the element they describe, the DOM does not
Preface: I am aware that there is a duplicate question out there. I am posting it again because it has no answers (and it's from 4 years ago). General descripti
I have this form: <form> <label for="locationsearch">Location:</label> <input type="search" id="locationsearch" name="locationsearch" /
In the following code: <div onClick={() => console.log('outer div')}> <div onClick={() => console.log('middle div')}> <div onClick={(
I'm trying to set a simple script where, whenever you focus on an input and press Enter, something happens. Just like in those searchboxes on webpages and forum
The code below saves the contents of a <textarea> to the DOM when the Save button is clicked. function save() { // Create the new el
We are using indexedDB to store files locally. We have an issue when the browser is running out of space (reaching the available quota). It seems that the trans
How can I check if an element still exists in the DOM? <div id="parent"> ... <div class="my-class"></div> </div> let parent = docum
I realised when I am not logged in on my website certain DOM elements don't work. I am using passport-local implement auth on my website. For example when I pre
Is there a way of having a NodeList of the HTML tags in Mithril? I need to get the width of the blocks. Something like that on vanilla js: const blocks = Array.
I've been trying to make this work but I can't seem to figure out where the problem is coming from or what's producing it. The script randomly executes parts of
Shopping List exercise using JS DOM. My full code: https://codepen.io/lil_a/pen/BaQKvqZ?editors=0110 I have to add a new "Delete" button to every newly created
I have a script below, where I dynamically create an Element Node of type 'li'. This addMovieHandler() is called whenever the user clicks on a button. Additiona
I'm trying to get data from another webpage, using the HTML DOM. I tried code from another StackOverflow question (querySelectorAll() to html from another page)