how can I change image opacity using javascript? I\'m going to create a fading effect using javascript, is there any sample? is there anything like image.opacity that can be
First set the opacity explicitly in your HTML thus:
otherwise it is 0 or null
this is then in my .js file
document.getElementById("fadeButton90").addEventListener("click", function(){ document.getElementById("box").style.opacity = document.getElementById("box").style.opacity*0.90; });