Answers for "click doesn't work on ajax loaded data"

0

jquery click not working on ajax loaded content

$(document).on("click", '.mylink', function(event) { 
    alert("new link clicked!");
});
Posted by: Guest on August-11-2020
0

click doesn't work on ajax loaded data

The problem is that .click only works for elements already on the page.
You have to use something like on if you are wiring up future elements

$("#LangTable").on("click",".deletelanguage", function(){
  alert("success");
});
Posted by: Guest on June-30-2020

Code answers related to "click doesn't work on ajax loaded data"

Code answers related to "Javascript"

Browse Popular Code Answers by Language