Yes, I can help. You need to use event delegation to bind the click event to the dynamically loaded HTML elements.

For example, if you want to bind a click event to a button with class "my-button" that is loaded dynamically, you would use the following code:

$(document).on('click', '.my-button', function() {
  // code to handle click event
});

This code binds the click event to the document object and delegates it to any elements with class "my-button" that are added dynamically.

Make sure to replace ".my-button" with the appropriate selector for your element.

jQuery click event not firing on AJAX loaded HTML may you help

原文地址: https://www.cveoy.top/t/topic/bEk1 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录