jquery-tmpl not working with href links
Having trouble getting jquery-tmpl to create dynamic href links. The name shows up correctly but I can't seem to get data inserted into template placeholders inside href tags.
HTML
- <ul class="list1">
- <li class="leftnavlink"><a href="/categories/${id}">${name}</a></li>
- </ul>
JavaScript
- jQuery('ul.list1:first li:first').tmpl(categoriesData).appendTo('ul.list1');
JSON
- var categoriesData = [{"id":"20","name":"Aero Parts & Exterior","product_count":"0"},
- {"id":"33","name":"Front End","product_count":"0"},
- {"id":"39","name":"Front Bumper","sub_categories":[],"product_count":"0"},
- {"id":"40","name":"Front Spoiler \/ Diffuser","product_count":"0"}];