I have a section of my code, that is supposed to take the data from the JSON file and turn it into individual buttons which will later be styled. I want the button to look like this: The code I have to do this is as follows: The result for the code when I have it set to stringify is
Tag: html
How to fix clipped text disappearing in Firefox?
I have made a program where it alternates a word, after a short duration. I am using background-clip to add a gradient to the text. This program works fine on Chrome, but breaks in Firefox. The Text disappears after coming into view. I checked that the text is still there, since it is selectable, but is fully…
JavaScript slice text content and wrap first word in tag
I am converting the following jQuery code to vanilla JavaScript and have become stuck on the final bit. You will see in my snippet with the vanilla JS code, the span wrapped word is being inserted before the first word instead of replacing it. Am I incorrectly using the insertAdjacentHTML function? jQuery Ans…
functions deleting the paint canvas
I would really appreciate If someone could figure out what is wrong with my functions. I’m working on this simple paint program and I have Undo and Clear buttons. Undo is supposed to clear the last drawn line (the function deletes the last element of the array since the array consist of all the drawn li…
How to change background of div using button
I have code: How can I change background color of <div class=”block”> using buttons <input type=”button” name=”grey” value=”grey”> and <input type=”button” name=”red” value=”red”>? I tried to do it, but nothi…
Implement localStorage to save Dark Mode Button Click and Class [closed]
I’m trying to implement a localStorage for my dark mode, but I can’t do it, whats the best way to do it so? Here is my working JS / Html code, what I need is no
How to restructure parent child details in JavaScript, retrieved from database?
I am trying to display parent( Survey ) & child ( Survey participants ) details retrieved from the database ( Salesforce ). I am using LWC ( Lightning web component ) to display the details. There is a limitation in lwc that you can’t access data from a related object using ‘__r’ ( This …
Disable autocomplete for Japanese
I am making a Japanese typing game for the browser using HTML, CSS and JavaScript. Everything is fine, except when I type hiragana cahrecters into the input field, it suggests different hiragana and kanji. This basically ruins the point of the typing game. The HTML autocomplete = “off” does not wo…
how to move button on bottom using css?
I am trying to move my button on bottom (some pixel above bottom).so it always be in bottom whether it contend is less or large. I tried using flex-box also not able to do that.Container have min-height : 500px here is my code https://jsbin.com/joyalosate/edit?html,css,output Expected output :: Explore produc…
Javascript to change of a list items color when checked
I am trying to write Javascript so that when one of these list items is selected by the user, the color changes red just for the selected item. The issue I am running into is that this selects all of the list items, instead of the one that is selected. Right now my Javascript looks like this: The HTML looks