Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

listen for double click before click

element.onclick = event => {
   if (event.detail === 1) {
     // it was a single click
   } else if (event.detail === 2) {
     // it was a double click
   }
};
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #listen #double #click #click
ADD COMMENT
Topic
Name
2+9 =