.html() help
.html() help
I'm new to jQuery (coming from prototype.js). I've got an ajax call that passes variables to a template and returns html based on the variables... In prototype i could set the innerHTML of the element and it would work fine. In jQuery, when I pass through the template, it is not working but if i include the html in a script tag, it works...
for example:
#editRow is the unique id of a <tr> tag
the template I'm including simply contains:
"<td colspan=9>EDIT FORM</td>"
$('#editRow').load(templatePath); /*ISN'T WORKING*/
by replacing the code on the template with script below, the process works:
$('#editRow').html('<td colspan=9>EDIT FORM</td>'); /*WORKS*/
NOTE: If i load the template into a <div> tag, it works fine.
Any pointers on what I'm doing incorrectly is appreciated.
Thanks in advance,
DJ