+ 8
JavaScript visibility[solved]
How can i set the visibility of an element with JavaScript , from hidden to visible by pressing a button.
9 Answers
+ 7
It may work , but i didn't learned about addEventListener yet , and i don't know how to use it.
+ 7
Satnam Singh yes , but in js
+ 6
Use
element.style.opacity -= 0.1
Within an interval within click event
button.addEventListner("click", function() {
setInterval(function() {
element.style.opacity -= 0.1;
});
});
Good luckš¹
+ 4
š§Alex Tusineanš„
"addEventListener"
Explained in MDN web docs
https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
+ 1
You got it ALEX
0
Solved xD .... man I didnt see the solved part
0
xD well at least I learned something New :)