Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js fadeout

const target = document.getElementById("target");

target.addEventListener('click', () => target.style.opacity = '0');
// If you want to remove it from the page after the fadeout
target.addEventListener('transitionend', () => target.remove());
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #fadeout
ADD COMMENT
Topic
Name
1+6 =