jQuery - Combining elements
<p>I'm trying to combine the location of my WordPress theme folder to a jQuery element. I haven't used jQuery much before and I've done a little research but haven't found anything of value.</p>

<p>Here's my JavaScript variable</p>

<pre><code>&lt;script type="text/javascript"&gt;var templateDir = "&lt;?php bloginfo('template_directory') ?&gt;";
</code></pre>

<p>And I'm wanting to add 'templateDir' to this:</p>

<pre><code>$next = $('&lt;li&gt;&lt;a href="#" class="next" class="controls"&gt;&lt;img src="images/right_button.png" border="0" /&gt;&lt;/a&gt;&lt;/li&gt;');
</code></pre>

<p>Ideally I thought it would be something like this, but it just errors.</p>

<pre><code>$next = $('&lt;li&gt;&lt;a href="#" class="next" class="controls"&gt;&lt;img src="' + templateDir + 'images/right_button.png" border="0" /&gt;&lt;/a&gt;&lt;/li&gt;');
</code></pre>

<p>So I'm not quite sure how it works. Thanks.</p>

<p><strong>Update:</strong> Fixed the issue. Seems it was all down to the jQuery file not being first. Thanks.</p>
