Solutions to invalidation of live and on dynamically generated elements above jquery1.9

From , 5 Years ago, written in JavaScript, viewed 113 times.
URL https://pastebin.vip/view/2122c699
  1. //动态生成的元素要用这个方法
  2. $(document).on("click", "#xxx", function() {
  3.     ……
  4. });
  5.  
  6. //非动态生成的元素还可以直接用on,但不能用live
  7. $("#xxx").on("click", function(){
  8.     ……
  9. });
  10.  

Reply to "Solutions to invalidation of live and on dynamically generated elements above jquery1.9"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website