I am using jquery template to populate order details. I have a hidden field, based upon its value, I need to hide or show a specific column. How to do it. My code look like below
<script id="TestTemplate" type="text/x-jquery-tmpl">
<tr id="trOrderDetail">
<td align="right">${order_id}</td>
{{ if document.getElementById('hdnShowQty').value == "0" }}
<td align="right">${qty}</td>
{{/if}}
</tr>
</script>
I tried it, but it is not working.
I got the code working. There is space between {{ and if , }} and "0". So correct code is as below