I want to have an event handler that executes only once and then unbinds itself from all the elements it was bound to.
I know of .one()
but when using it "The handler is executed at most once per element".
Is there a "built-in" way to bind an event handler to multiple elements and have it removed automatically from all of the once it is executed on any one of them?
See Question&Answers more detail:os