I load some HTML code into a div with the .load function af jQuery that contains some code I want to execute;
$.ajax({
type: "GET",
url: url,
dataType: "html",
success: function(data){
//.....
}
});
After loading the ajax request the alert(); function works, but the the someFunction won't.
$(document).ready(function(){
alert('TEST'); //this works
someFunction("#debug",'var');//this doesn't
});
How can I execute this function from an Ajax call
A function executed as <a onclick="someFunction()"
won't work either.