title: How to convert text to Float and print in a new div the result of account
body: <p>I'm trying get a string in a div, remove the content of this one, and after this get the real price in ".skuBestPrice" remove special chars and do an account to convert in a float number and finish printing this number in the div ".totalPrice", but is not working correctly, what's the issue? Thanks!!!</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> /* Transform String in Number */
          $(document).ready(function() {
            function formatPrice() {
           //$('.totalPrice').empty();
           var price = parseFloat($.trim($('.skuBestPrice').html()).replace(",", "").replace("$", "").val());
           var total = (parseFloat(price)/100).toFixed(2);
           //$(".totalPrice").val(total);
             document..getElementsByClassName(".totalPrice").innerHTML = total;
            }
           //$(document).on("load", "strong", formatPrice);
          });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!-- begin snippet: js hide: false console: true babel: false --&gt;</code></pre>
  </div>
  </div>
  </p>