title: path to assets in Wordpress using jQuery
body: <p>Hi i'm trying to replace the add to cart button by a loading image in jquery but I can't seem to find the write path using jquery.</p>
  
  <p>This is my code in coffee:</p>
  
  <pre><code>$('.add_to_cart_button').click -&gt;
      templateDir = "&lt;?php bloginfo('template_directory') ?&gt;"
      ajaxImage = document.createElement("img")
      ajaxImage.setAttribute("src", templateDir + "/static/img/ajax-loader.gif")
      $(@).replaceWith(ajaxImage)
  </code></pre>
  
  <p>this outputs in the DOM :</p>
  
  <pre><code> &lt;img src="&lt;?php bloginfo('template_directory') ?&gt;/static/img/ajax-loader.gif"&gt;
  </code></pre>
  
  <p>anybody know how to put in the right path ?</p>