I’ve got a webview component that loads some html and javascript. The html + javascript is fairly large, and is compiled using webpack into a single page (html, javascript and css is all in one document). I’m having trouble figuring out a reasonably efficient approach to developing my web content,…
clone 1 row of divs with another on click
I have 2 rows. Each row has 3 individual DIVs that can be selected (Clicked) by the user. When the the user clicks on any of the DIVs on the first row, there is styling in CSS to change the colour of the individual DIV (column if you like) I would like the corresponding DIV (column) in the 2nd row
Add functions in other folder, to an object in this folder
I want to create an object that would import functions from another folder and it would look something like this: The functions would be inside of a different folder, however, I want to make some sort of importer in which it would make new classes for each new function/file it finds inside of the folder. some…
JavaScript – Remove strange characters from string
How do I remove these strange characters from a string? I have been trying with regex, but with no success. Before Remove: RegExr was created by gskinner.com, and is proudly hosted by Media Temple. *…
keyCode and which are deprecated – so why is that not working?
According to MDN Web Docs KeyboardEvent and Google Updates KeyboardEvent key and code are implemented while keyCode and which are deprecated. With that in mind I should be able to dispatch keydown event as below: Unfortunately it doesn’t work whilst if I add keyCode additionally this script works perfec…
React JS – CORS Missing Allow Header when sending POST request
I have some problems with sending a POST request to my REST-API. The problem is, when I send it from a react application, it shows me this error in the debug console of firefox. The funny thing is, that it works perfectly fine when sending the request with postman. This is the code i use to make the request: …
How to slide up only one card box at once from lists of cards?
Here are the code for my website which look like this : My CSS Look like this : Here is the HTML Javascript look like this : Its Slide up all cards lists items all at once I want to know how to implement it for single item at once! Is there any way to hover the single item and
I have a countdown timer and its seconds and minutes are not moving
Timer is not working in javascript. I want to have a countdown timer that works automatically. But here, only hour hand is moving. Seconds and minutes are not changing at all. The code is as follows : Answer Typo const min = document.querySelector(“.mins .numb”); Improvement:
Having an issue with deleting items in to do list project
I’m having an issue with the delete function. I’m at the point where I can remove only one line before pushing the submit button again. It seems that I can remove only the first paragraph that was submitted. It feels like eventListener applies only for the first line. Do I need a loop here? Here i…
Print path from root to a given node in a tree with multiple children
I am trying to print the path from root to a given node containing value of 2. Each node can have children containing several nodes. Here is a visual reference I have flight data like this: This is the code I wrote so far: So far I’m getting: It seems like it is able to find the node containing the