Help cascading templates plugin
Hi,
I been testing the jquery.template.js plugin, but I cant figure a way of cascading severate templates.
var te = $.template("<div>${test}</div>");
$("body").append(te, {test: "hello world"});
this works fine for one template, but there following doesnt work:
var te = $.template("<div>${test}</div>");
var ce = $.template("<div class='inner'>${message}</div>");
var result = "";
$(result).append(ce, {message: "hello world"});
$("body").append(te, {test: $(result)});
Ive tried $(result).html() or $(result).text(), none of them work. My output is either completely blank, or [object Object]
Can anyone suggest what Im doing wrong?
kind regards