ok i am not sure why is this happen, can someone tell me the answer to this?
this is my code on my html.
i created a link
<a id="configPage" href="#">Card List</a>
from this link, it will lead to this jquery code when click
$("a#configPage").click(function(){
var request = $.get('controller.php',{ action: "configView", subaction: "" });
request.success(function(result) {
$( "#resultContent" ).html(result);
console.log(result);
});
request.error(function(jqXHR, textStatus, errorThrown) {
if (textStatus == 'timeout')
console.log('The server is not responding');
if (textStatus == 'error')
console.log(errorThrown);
// Etc
});
return false;
});
from the .get, i will go to my php script and return a set of HTML code with forms in it and populate to #resultContent div.
this is working fine. But after my form has been populated in #resultContent div, i have another same link inside that html
<a id="configPage" href="#">Card List</a>
this time, that link above is not firing the jquery anymore. I found out that the html return is not showing in my view source code. Is this the reason why is not firing? how to solve this? or i am doing it wrong?
edit: everything from the return HTML is not firing any jquery at all such as form on submit button etc. Is like that whole div with the returned html code is not exist