I have a main page where I call the “download” and the HTML intermediate page, and when the download is complete, I massage the returned HTML to add a few DIVs, etc., when I try to link the onclick event for dynamic Divs (added by me after returning HTML from an intermediate page), it looks like it doesn't work at all !:
LOAD:
$j(".loader").load(myURLtoIntermediatePage, '', function() {
var HTML= '<div id="abcd">test</div>';
...
$j(".pageDIV").append(HTML);
}
DOCUMENTS READY Function
$j(document).ready(function() {
$j('#abcd').onclick(function() {
alert($j(this));
});
});
source
share