I have a jquery template with N radio buttons and I need to select radio button with value that I pass after loading template from external html file(using jQuery.tmpl() method). Is there a good way of selection of radio button in template without multiple {{if}}, {{else}} statements, duplicate code and selectors?
Share
In what format is your data coming back from the server? If it’s a JSON array, could you do something like this?
html:
javascript:
http://jsfiddle.net/JbTwB/1/