javascript - Syntax error of conditional in JQuery template -


i want kind of data-driven gui using conditional in jquery template, following code part:

<script id="resulttemplate" type="text/x-jquery-tmpl">            <li>                    {{if checkfile(${link})}}                        <p class="buttons"> <a href = ${link}>${type}</a></p>                    {{else}}  ${type}                  {{\if}}             </li>   </script> 

i got error browser javascript console:

uncaught syntaxerror: unexpected token { 

am missing in using conditional in jquery template?? couldn't see wrong according


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

php - HTTP_REFERER woes: How can I allow access to a specific page, only when a visitor has visited another specific page beforehand? -