This example does not work for me:
$.tmpl('<span class="ui-button ui-widget ui-icon-${data}">\
${data}</span>', \
["info", "delete"]\
)
since it will return nothing in place of ${data}. I also tried with ${item} which gave me same result.
What i want to achieve, is to insert the text "info" in the first generated span and "delete" in the next span.
As a workaround, i can pass in objects like so:
[{name: "info"}, {name: "delete"}]
and access them with ${name} directly.
But how to i make it work without the workaround?? What is the correct syntax for getting element in aray?