How to bind events to HTML injected from AJAX requests

前端 未结 4 856
逝去的感伤
逝去的感伤 2021-01-14 20:48

So I am injecting html via an AJAX request:

Ajax Response

  
HTML from AJAX request
4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-14 21:12

    Add your event after injecting html via an AJAX request has been completed
    or
    you can use on method

    see this example also

    Event binding on dynamically created elements?

提交回复
热议问题