Apologies for my broken example above :/

2008/5/1 Oliver Boermans <[EMAIL PROTECTED]>:
>  I'm looking for a way to run the template.apply function _outside_ of
>  the dom related methods.

I had another poke around the code of jquery.template.js and Firebug
and managed to coax out what I was looking for:

var t = $.template("<div>${say}</div>", { say : 'Hello World' });
t.html = t.apply( t.options );
$('#world').append( t.html);

Perhaps this facility could be incorporated into the plugin itself?

The template plugin is clearly designed as an extension to jQuery’s
existing dom manipulations.
It would be nice to to also be able to use it of them to manipulate
strings independent of the dom.

Cheers
Ollie

Reply via email to