jquery php variable
<p>I have a variable hard coded in to my html inside script tags like this(it calls meta information from a wordpress post and I've checked that the meta is being pulled)</p>

<pre><code>&lt;script type="text/javascript"&gt;
   var jg_product_price = "&lt;?php echo get_post_meta($post-&gt;ID , 'productprice' , true); ?&gt;";
&lt;/script&gt;
</code></pre>

<p>my jquery code reads;</p>

<pre><code>.prepend('&lt;span&gt;'+jg_product_price+'&lt;/span&gt;');
</code></pre>

<p>the html output is:</p>

<pre><code>&lt;span&gt;&lt;/span&gt;
</code></pre>

<p>i.e an empty span</p>

<p>Is it something to do with the "'" in the var jg_product_price? Many thanks</p>
