How can I create an event which executes only once in JS?

Forums JavaScriptHow can I create an event which executes only once in JS?
Staff asked 2 years ago

Answers (1)

Add Answer
Staff answered 2 years ago
hello,
you can try this:
 <script>
        $(".event-handler-btn").one("click", function (e) {
            alert("hellow!");
        });
</script>

 

Subscribe

Select Categories