Suppose there is a button, is it possible to hang an event on it and that from another place in the code other subscriptions to this event would not work? That is, only one first subscription worked. Or is it a crutch method?
example:
$("button").click(function(){ alert("one"); }); $("button").click(function(){ alert("two"); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <button> click me </button> it is necessary that there was only one message and worked once, that is, to remove the event after its execution