I implemented a process where the user selects an option from a div, and it is inserted in the content editable div. To achieve that, first I save the selection range on the mouseup and keyup events of the editable div. When the user clicks on one of the options of the div, it restores the selection range, in…
Tag: html
Hide Twitch iFrame If Channel Not Live
We have a site embedding Twitch streams. They have events for a channel going offline. So when a stream is live, then it goes offline, I can essentially then hide the iframe. However, I’m wanting to have it so if when the page is loaded, and the channel is already offline, the iframe doesn’t show.…
Random image from html on button click
I am trying to make a script that will take the images from one div element and put it to div rndmImage randomly on button click, I should see images when document is loaded, but the new div where images should go after click must be empty until click heapends. And I need only JavaScript, no jQuery, alse i ca…
Display price based on User selection
I can’t seem to get the price to display on the page with image. The correct image displays and the correct price is passed to PayPal, but I can’t get price based on the selection to display with the image. I can not seem to get the price to display on the page with image. The correct image displa…
How to disable an option when selected more than 5 times in dynamically generated rows?
Following is my code : At the end of the row I have an add button where this dropdown will be added dynamically.Along with this dropdown many other textfields are present. My Requirement : When user selects the same option in the dropdown the valuesmore than 5 times the values should get disabled. Should happ…
Accessing html elements from another page inside div
So I’m pretty new to html/javascript but i’m working on a project where i’m loading a external html page inside a div, that when loaded looks like so: and inside the ‘#document’ is the external html. This external html contains some titles that can be minimized and maximazed to h…
jQuery font size wrong result
I am trying to write a script to help disabled people to read the site. On a button click, I’d like to increase all font-size in my page. However the script sets wrong values. The code is the following: However, it give me back totally wrong increased number. For example when the current font size was 1…
Close my spans when I click on my a inside my menu
I made a responsive menu a few days ago, it’s working pretty well except when I click my a inside the menu-ul I created, it closes the menu but not the state of my burger menu spans. Here is the code so you can understand Can someone help me with this? I already checked some subjects close to mine, but
HTML Local Storage Dark Mode Using JavaScript
I tried to make a complete darkmode to my website. It’s almost done, but I have an issue. When I reload the page the dark mode goes back to the default light mode. How can I sovle this problem? I tried some code but it didn’t work. I want to use Local Storage, but I don’t know how to add
Buttons and Links on My Website Don’t Work After Updating Chrome [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 2 years ago. Improve this question After…