This is what i got:
https://codepen.io/flo44781/pen/ydPMNM
But why i need to click 2 times on the button in the beginning to open up the div?
Best regards,
Florian
This is what i got:
https://codepen.io/flo44781/pen/ydPMNM
But why i need to click 2 times on the button in the beginning to open up the div?
Best regards,
Florian
Can someone help me?
Try to console.log
the value of style.display
of the div
every time you click the button. You will see that the first time the value is not none
but an empty string. So the else
condition is applied the style.display
is set to none
; now when you click again the display value is set to block
.
How do i do this? I am sorry i am learning…Thanks a lot for your reply!!!
Still not getting it
Already solved,try to change value style.display