Thanks Stan! jQuery template is helping make my code much easier to
read.

I have a question regarding it’s use. Have a look at this somewhat
contrived code:

var master = '<div>${include}</div>';
var parts = {
    says :  'Hello world!',
    include : '<p>${variable}</p>'
}
$('#world').append($.template(master), parts);

As expected this does not work as the template parsing is not applied
to the 'parts'.

Is it possible to parse these variables without appending them to a
DOM element first?

Cheers
Ollie

Reply via email to