Skip to content

Tag: css

Display DIV’s on Click

I have 2 div elements, and I want to add something on the Div 2 that when I Click on that Div, it will Display Div 1, so both DIV’s will be visible when clicking Div 2! Div 2 should remain visible all the time, but when I click on DIV 2, it should display Div 1! I want a

Changing class of button and display of div with JavaScript

I have JavaScript to show/hide div on click. Inside that div are more buttons to show/hide PNGs. I want the clicked button to have a bottom border line until another button in that div is clicked. I have achieved this but each time I click on a button in the shown div the bottom border line stays on the butto…

How to add custom styles to input type=”range”

I have 4 custom input[type=”range”] on my page. I used some JS and CSS to add styles, but it seems that only the first one works properly. What am I doing wrong and how to make all of them act like the first one? I don’t want it to be like a regular range and I thought that JS +

Loop throught elements comparing previous values

I have a father div with X number of child divs. What I’m trying to do is to loop throught all the child elements and alternate some styles. For example (having 4 child divs) Child 1 style = nothing; Child 2 style = font-size: 24px; Child 3 style = nothing; Child 4 style = font-size: 24px; At the moment…

Is is possible to bend a row of divs around a point?

This is the result i want to make with divs How can i achieve this result? Edit: my goal was not to use divs only that i didn’t want to use canvas. But i haven’t thought about SVG’s so thank you! Answer Here’s a quick and dirty alternative example using SVG arcs

Remove data undefined in popup map Javascript

I have json data, and the data is displayed in a pop up on a map when there is a data that does not exist (Visibility), then the word undefined appears on the pop up How to remove undefined text, so that it gets deleted on the pop up? json data : script js : Pop Up : Help me,

Make dropdown options kickoff JS function

I have a HTML/CSS snippet here: https://codepen.io/trudeau_sucks123/pen/PoOyrzK for a dropdown that expands upwards. I would like to launch a JS function upon clicking one of the options but doing so through a button seems to create really weird /ugly result. How can I get this to appear normally? (note i&#82…