How to bind a jquery trigger click on ajax loaded content
In this tutorial, we will learn How to bind a jquery trigger to click on ajax loaded content example. We will explain the Jquery click event on ajax load content in bind using document element. In this post, we will simple example of a jquery click event on ajax loaded content example. We will give a very simple example of How to bind a jquery click event on ajax loaded content in jQuery.
in this tutorial, we use jQuery click like event in the Ajax loaded content, it will not work in a normal scenario. the jQuery click, change, blur, hover, jquery trigger click, submit, etc event need to be bind properly in the dynamic content loaded by the Ajax data and loaded data in specific id or class in click event generated. we need to use the event delegation for Ajax-generated data using jQuery and to disable previous dates use in using JQuery.
I would like to share create jquery button click on ajax loaded content Example Example.
Now start examples that will help you bind a jquery click event on ajax loaded content example.
Example of jquery trigger click
$(document).on("click", ".user_profile", function() {
alert("Ajax content click event!");
var user_data = $(this).attr('user-data');
console.log(user_data);
});