Underscore JS template If loop issue

farmer

New Member
I am trying to add an attribute (\[code\]rel="tooltip"\[/code\]) based on if condition \[code\]<div class="symbol"><span title="<%= data%>" <% if ( data.length > 9 ) { rel="tooltip" }%>></span></div>\[/code\]If I am adding an alert inside if loop it works, where as the attribute change does not work.
 
Back
Top