Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

event listener works without being clicked

document.getElementById("main_btn").addEventListener("click", function (){
    hideId("main");
});
//dont call the function directly, use function that calls it
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #event #listener #works #clicked
ADD COMMENT
Topic
Name
9+5 =