Why does Firebug say toFixed() is not a function?

前端 未结 5 1722
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-23 19:57

I am using jQuery 1.7.2 and jQuery UI 1.9.1. I am using the code below within a slider. (http://jqueryui.com/slider/)

I have a function that should test two values a

5条回答
  •  心在旅途
    2020-12-23 20:50

    That is because Low is a string.

    .toFixed() only works with a number.


    Try doing:

    Low = parseFloat(Low).toFixed(..);
    

提交回复
热议问题