Recently in the development of the page, when doing page effects, you need to give a dynamically loaded button to an event
Then use $ (obj) without hesitation. bind (); To bind the event.
But there is a problem with this:
Bind can actually bind events, but that's relative to fixed HTML tags.
When the content of the page is dynamically loaded, there is a bug in the Bind event, only one bind at a time, which is useless when you trigger the event for the second time.
For example:
I give the <a> tag a click, and the <a> tag includes content that is read from the background data and then loaded dynamically. When I use bind to bind the Click event, the first click clicks can trigger a successful
But the second click, the click event is invalid ...
A later study found thatjquery also had a way to bind events: Delegate (); Use the following:
$ (". Sentnum-box"). Delegate (". A-add-ordergoods", "click", Function () { //JS Data code});
This enables dynamic data-bound events to be implemented and will never expire
About jquery using bind dynamic BIND event Invalid handling