[jQuery] jTemplates and event handlers ?

[jQuery] jTemplates and event handlers ?


Hi there,
I have created a table of data using jTemplates where I have my table
template in a seperat .html file. I generate some links in the the
table that i want to add a event handler to but i can't get it to
work. What i do is using this code to add event handlers to all links
with class name "remote" and then add it to (document).ready :
function addClickHandlers() {
$("a.remote", this).click(function(e) {
e.preventDefault;
$("#Container").load(this.href, addClickHandlers);
alert('Testing event handler');
});
}
$(document).ready(addClickHandlers);
But the event handler does not get added. Is that because the
jTemplate is in a seperat file ?