Created
March 20, 2018 02:57
-
-
Save J2TEAM/e704cd069b8d86aed9c07e079cb8bac5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Developed by Juno_okyo */ | |
function clickCount(c){var b=document.querySelector(c);if(null!==b){var a=b.dataset;void 0===a.clickCount?(a.clickCount=1,b.addEventListener("click",function(){clickCount(c)},!1)):(a.clickCount=parseInt(a.clickCount)+1,console.info("Clicked: "+a.clickCount))}} | |
// <button type="button" id="test">Click me</button> | |
// Call function: clickCount("#test"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment