Because parseInt('$7.95') is not a number. Perhaps you want:

var price = '$7.95';

var priceFloat = parseFloat(price.substring(1));

--Erik

On 8/7/07, cfdvlpr <[EMAIL PROTECTED]> wrote:
>
> Here's my faulty code:
> var temp parseInt($('td#totalPriceData_1').text());
> alert(temp);
>
> Here's what my HTML looks like:
> <td id="totalPriceData_1" class="totalPriceData">
>                                                                               
>   $7.95
>                                                                         </td>
>
> Why does alert(temp) show me NaN for this temp var?
> What is a better way to convert this text to a int?
>
>

Reply via email to