JQuery Templates, escape "$ {...}"
I have javascript code like this:
var data = { ... };
var template = "<select>" +
"<option value='${0:###,###.##}'>Format as $</option>" +
"</select>";
$.tmpl(template, data).appendTo("#placeholder");
My problem is I want to evaluate "value = '$ {0: ###, ###. ##}'" as a string, but jQuery templates try to evaluate it as an object reference.
Is there a way to escape the $ {} characters?
Cheers, Shane
+3
source to share