title: Using Javascript Replace function to remove € Symbol from String
body: <p>I'm not sure where I'm going wrong but I'm trying to remove a € symbol from a String using <code>jQuery</code> as I'd like to be able to add the Values to a shopping cart.</p>
  
  <p>Anyways, this is my fiddle: <a href="https://jsfiddle.net/javacadabra/uuu8px6r/1/" rel="nofollow">https://jsfiddle.net/javacadabra/uuu8px6r/1/</a> </p>
  
  <p>I'm calling the javascript <code>replace</code> function on a variable which I presume shouldn't matter? </p>
  
  <p>If anyone can't see my <code>fiddle</code> this is the <code>html</code>:</p>
  
  <pre><code> &lt;div id='shopping-cart'&gt;
                  &lt;span&gt;&lt;span id='s-qty'&gt;0&lt;/span&gt; Items in Cart&lt;/span&gt;
                  &lt;span&gt;€&lt;span id='s-total'&gt;0.00&lt;/span&gt;&lt;/span&gt;
  &lt;/div&gt;
  &lt;p class="book-price"&gt;€7.99&lt;/p&gt;&lt;div class='add-to-cart'&gt;Add to Cart&lt;/div&gt;
  </code></pre>
  
  <p>and my <code>jquery</code>:</p>
  
  <p>var cartitems = 0; </p>
  
  <pre><code>$('.add-to-cart').click(function(){
          var bookprice = $(this).parent().find('.book-price').text();
          bookprice.replace('€', '');
          cartitems = parseFloat(cartitems + 1);                   
          price = bookprice;
          $('#s-qty').html(cartitems);
          $('#s-total').html(price)
  });
  </code></pre>
  
  <p>The above code is giving me the following output:</p>
  
  <p>€€7.99 (the euro symbol is never being removed).</p>
  
  <p>Probably a trivial question, so apologies but I'm at a loss so would appreciate any help.</p>
  
  <p>Thank you. </p>