title: handling jQuery onClick event on handlebars
body: <p>I would like to set up a simple jQuery onClick event to make the UI dynamic on a handlebars template. I was wondering to addClass() after a specific click. </p>
  
  <p>consider the HTML (generated by handlebars)</p>
  
  <pre><code>  {{#if hasButton}}
        &lt;div id="container"&gt;      
            &lt;button type="submit" class="myButton"&gt;Click me!&lt;/button&gt;
        &lt;/div&gt;
    {{/if}}
  </code></pre>
  
  <p>i.e: After a click within a button, its container will receive a loading class that will create the interaction using CSS.</p>
  
  <pre><code>$(".myButton").on("click", function(event){
          $(this).parent().addClass("loading");
  });
  </code></pre>
  
  <p>This code should goes on my handlebars-template or should I rewrite it into a specific helper for it? Is there any examples that could be provided so I can study it then develop something similar?</p>
  
  <p>Thanks in advance!</p>