Home >Web Front-end >JS Tutorial >Quick solution to repeated binding of jquery events_jquery
One $.fn.live duplicate binding
Solution: Use the die() method. Before binding the live() method, unbind all previously bound events on this element, and then pass the live () method binds new events.
Solution: Use the unbind("click") method to unbind the bound event first and then bind the new event, that is, remove the object before binding the event to the object Original event on
Complete test code: