Get jquery formatted value
<p>I have a div like this : </p>

<pre><code>&lt;td id="length" data-length=&lt;?php echo $length;?&gt; &gt;
</code></pre>

<p>And I want to get the value of my php variable ($length) in a jquery script.</p>

<p>After that I have to format it to replace the comma with point.</p>

<p>With this snippet : </p>

<pre><code>var $length         = jQuery(this).find("#length");
console.log($length.data('length'));
</code></pre>

<p>I  see read my variable in the console</p>

<p>but when I want to format it to replace the comma with a point like this  :</p>

<pre><code>console.log(parseFloat($length.val().replace(",", ".")));
</code></pre>

<p>I get NaN</p>

<p>Please help to solve that problem !</p>
