title: Conditionals in jQuery templates
body: <p>I have a jquery template setup like this:</p>
  
  <pre><code>&lt;script id='tmpl-video_list' type='text/x-jquery-tmpl'&gt;
  &lt;li&gt;
      &lt;a href='${url}'&gt;&lt;br/&gt;
          &lt;span class='image_border'&gt;
              &lt;span class='image_container'&gt;
                  &lt;img src='${thumb}' alt='' title='' /&gt;
              &lt;/span&gt;
          &lt;/span&gt;
      &lt;/a&gt;
      &lt;div class='search_block'&gt;
          &lt;span class='name'&gt;${caster_name}&lt;/span&gt;
              &lt;a href='${url}'&gt;
                  &lt;span class='search_title'&gt;${title}&lt;/span&gt;
              &lt;/a&gt;
      &lt;/div&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p></p>
  
  <p>And the data I'm sending looks something like this:</p>
  
  <pre><code>{
      _index:i,
      url: url,
      thumb: thumb,
      name: name,
      title: title
  }</code></pre>
  
  <p>All That is working great. My question is that if there is a way to put a conditional in there. I know about the {{if}} and such as stated in the docs but I'm wondering if you can do something like this:</p>
  
  <pre><code>{{if ${_index}+1 % 5 == 0}} class='last_search_video' {{/if}}</code></pre>
  
  <p>I tried that and it didn't work. I actually don't like the <code>_index</code> in my object but I thought I'd give that a change. I'm thinking the current index is passed into the loop for the template but I have no idea.</p>
  
  <p>I'm not married to jQuery's templating plugin so if someone knows a better plugin please feel free to suggest another one. </p>