Since the goal of using an anonymous function is presumably not to create a new variable, you could instead store the reference in the element itself: Later, when you want to remove it, you can do the following: Remember, the third parameter (false) must have the same value as for adding the Event Listener. Don't use the unbind() method, it has been deprecated since jQuery 3.0. All public events are relayed using the jQuery event system, and they are triggered on the