Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

auto click script

var clickMe = document.getElementById('clickMe');

clickMe.addEventListener('click', function() {
  console.log('I was clicked');
}, true);

setTimeout(function() {
  var event = new MouseEvent('click'),
    canceled = !clickMe.dispatchEvent(event);

  if (canceled) {
    console.log('Click event was canceled');
  }
}, 5000);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #auto #click #script
ADD COMMENT
Topic
Name
3+9 =