JSFiddle - React, Tailwind, and code Playground

by jfriend00

HTML

<button id="test">Test</button><br><br>
<div id="result"></div>

JavaScript

function someMethod()
{
    if (!someMethod.bound) {
        $("#test").click(function() {
            $("#result").append("clicked " + (new Date()).toLocaleTimeString() + "<br>");
        });
        someMethod.bound = true;
    }
}

someMethod();
someMethod();
someMethod();
someMethod();