[Answered ]-.on() function not working for Ajax Loaded Form in Bootstrap Modal

1👍

The element to which you attach the event has to exist on the DOM. You’ll need to use something like this

$("#cell_modal").on('click', '#cell_submit', function(event){
    alert("LOL");
});

For more information about this, please check the section Direct and delegated events here

1👍

You need to start by selecting the document. It should look like this:

$(document).on('click', '#cell_submit', function(event){
    alert("LOL");
});
👤Bryant

Leave a comment