#Trying to make something disappear in js, but it wont work, cuz im a dumbass and i dont know what i-

57 messages · Page 1 of 1 (latest)

jolly jetty
#

heres the code pen

#

for the best experience, use it in full mode

vital tendon
#

Could you just add

for (const dot of dots) {
    dot.style.display = 'none';
}

?

#

In your set timeout probably?

 setTimeout(() => {
    calibrated.style.display = "none";
    for (const dot of dots) {
        dot.style.display = 'none';
    }
 }, 2000);
knotty sandal
#

^ What Jacob said works

jolly jetty
jolly jetty
knotty sandal
#

It's an overlaid <div> with black color and opacity set to 0.5

#

You didn't write this code?

jolly jetty
#

yeah but i cant get it to show up

#

it wont show up

knotty sandal
#

What do you mean by that?

jolly jetty
#

hold on

#

would you go in a vc?

#

so i can explain

knotty sandal
#

Not gonna do a call right now

#

You can type it out

#

You want the black overlay to show up another time?

#

Don't set it to display: none

jolly jetty
#

and when the calibration is finished

#

then it goes away

#

with the dots and the calibrated message

#

because now the background it too light

knotty sandal
#

It's not visible, because you haven't set it to be visible

jolly jetty
#

no

#

thats correct

#

wait

#

shit

knotty sandal
#

So, change that?

jolly jetty
#

wait wait hold on

knotty sandal
#

You knew you set it to be display: none but you don't want it to be that?

Just remove that from there, and you got that done

jolly jetty
#

yeah but now it always says calibrated

knotty sandal
#

How did you hide the dots?

#

Do the same for that div

jolly jetty
#

i want it only to say calibrated when all the dots are clicked

#

alright

knotty sandal
#

And you can get the <p> tag inside it, and change that to say nothing or be hidden until you have calibrated things?

#

<p style:"display:none;">?

jolly jetty
#

damn dawg

knotty sandal
#

You wrote this entire thing, without knowing HTML/CSS?

#

Or basics of it?

jolly jetty
#

preciate it tho

knotty sandal
#

Figured, cause you had everything basically already there

#

Just didn't know what to do with any of it

jolly jetty
#

got this after putting that in the paragraph tag

#

it works but the error is there lol

knotty sandal
#

Can assign a class instead of inline styling

#

And use CSS to style the element and hide text

jolly jetty
#

fixd it w

#

fixed it

knotty sandal
#

There you go

#

Probably wouldn't hurt to try things yourself as well