Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

dom click is not a function

//If click() function isn't working;
var targBtn     = document.querySelector ("#create");
var clickEvent  = document.createEvent ('MouseEvents');
clickEvent.initEvent ('click', true, true);
targBtn.dispatchEvent (clickEvent);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #dom #click #function
ADD COMMENT
Topic
Name
3+3 =