I am adding HTML dynamically to a web page, and I also use jQuery to manage files.
When I add HTML, jQuery ignores its existence.
For example:
$("td.elementToClick").click(...
Will work fine with jQuery. But if somewhere in the code I add:
$("tr#myRowToAppend").append("<td class="elementToClick>...</td>");
jQuery will ignore this new element if I click on it.
Since jQuery binds events after the page has finished loading, I need one of two solutions: - Make the DOM refresh the page without changing the current layout (I don't want the update, so location.reload () is out of the question). - Force jQuery to add this new element to this internal event dispatcher.
I do not want to use onclick="blabla()", I really need to use jQuery.
How can i do this?