Home > front end >  JQuery binding on events with off won't lift
JQuery binding on events with off won't lift

Time:10-31

The cause of the event is this:
Page 1, need to use an ajax request, but the request back is HTML, containing the script, the onclick event,
Layer 2, this is a pop-up event, close the pop-up layer with the remove (), not to clear all the event element and element under the
3, the ajax request again, on the click event will repeat binding
Off before 4 in the append () () didn't also the way to remove
5, close the pop-up layer off () didn't also the way to remove
Excuse me each bosses, this do?

CodePudding user response:

The unbind ([eventName1 eventName2])
The unbind (' click ')
  • Related