title: Using JavaScript in a jQuery template
body: <p>I can't get it to work. How do I add JavaScript to a jQuery template?</p>
  
  <p>I tried it in the following way without success:</p>
  
  <pre><code>&lt;script id="geoShapeTooltip" type="text/x-jquery-tmpl"&gt;
      ${ alert ("TEXT"); }
      &lt;table id="tooltipTable" &gt;
          &lt;tr&gt;&lt;th class="tooltipHeading" colspan="2"&gt;
                  ${item.fieldValues.NAME}, ${item.fieldValues.REGION}&lt;/th&gt;&lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Population:&lt;/td&gt;
              &lt;td&gt;${item.fieldValues.POP2005}&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>Here is my problem on <a href="http://jsfiddle.net/W5ys9/1/" rel="nofollow">fiddle</a>.</p>
  
  <p>edit: I found a different solution. In Infragistics templates you can execute javascript in if statements.
      {{if YOUR_JAVASCRIPT_GOES_HERE}}Some Text}}{{/if}}
  And if you want, you can add values to the parameter, to display them later. A little bit hacky, but works.</p>