i tried to add and remove the text of a box clicking on a different series of p this is the code. click1 is associated by text1 and same click2 text2 ecc. the goal i want to achieve is click on click1 and the only text that appears is text1 same thing for click2 text2 ecc. Answer
Tag: html
CSS Media Queries with ViewPoints
Well, I have been working on some website. It has come to my notice that mostly when people when using media queries they use fixed px values, or they use breaking points. so I wanted to know if it is bad to use viewpoints (vh/vw) in media queries, as so far they are working most devices. but the website work…
How to make same buttons work independently HTML/jQuery
I’m making favorite buttons that saves them with localStorage in a different page. I added those favorite buttons to every paragraph. I don’t want to write a lots of same codes for each of them. The question is that, is there any way to make same buttons work independently and save their parent ob…
How to convert html content in to one string
let html=”Some data some more data with some other data need to convert into string ” I want it should be become a single string like str=”Some data, some more data, some other data, need to convert into string”; This I need in Reactjs functionality. In comment section I have shared th…
Data not loading
I’m using Firebase Realtime database to load some data, but I am loading the data to an innerHTML of a <span> element inside an owl carousel(“https://unpkg.com/swiper/swiper-bundle.min.js”) the data only loads when I click the left arrow of the carousel.I tested the problem with a <…
How to limit amount of selected in custom select menu in javascript?
How to limit amount of selected in custom select menu in javascript? I want to make a custom select menu where you can select items in it. This is my code for now: What it does now is fine, I just want to add the limitation so that you can only select two items. This is because I want to
How do I toggle the elements with its corresponding button by mapping through an array in ReactJS?
I’m mapping through an array from a JSON. How do I get the button to toggle the display of the div containing listOfGrades with the ID? So 20 buttons for 20 listOfGrades divs, and each button should toggle its own corresponding div. Thanks! Answer You can add a property in your data which keeps track of…
Targeting textual data to a DIV on a web page?
I have a web page – index.html on a localhost webserver – split horizontally via DIV elements and a CSS stylesheet into upper / lower panes. Titles (hyperlinked to source HTML documents) appear in the upper split. Task 1. When I click a hyperlinked title, the output is targeted to a DIV on index.h…
React: Change / Iterate an Element Color Every Second
Coding World Say I have the above, I want to iterate through each element one at a time and turn the colour to gold. So at any one time only one of the words should be gold. First Hello should be gold, then Coding should be gold and then World should be gold. I tried to do it so it
set back counter to 0 if nothing is checked Javascript
I have multiple dropdowns that contain checkboxes and my goal is “on click” to check how many boxes are checked and if it’s more than 1 to hide a logo. I have 2 Problems. Problem 1: The counter never sets to 0 if no check box is checked. Problem 2: Every time I click it runs through the func…