1- the value on slider is showing $10 and not whowing 10.00 , and more ! 2 and how we set the slider like this is http://loopj.com/jquery-simple-slider/demo.html Predefined List, Equal Steps & Snap
Asked
Active
Viewed 154 times
0
-
are you using the same slider which is mentioned in the link? – Cerlin Jan 09 '15 at 13:33
-
not same ,,,, have modified form it – Rakhmat Ullah Khan Jan 09 '15 at 13:58
-
http://www.jqueryrain.com/?0qRLJKK8 ............ user like this but the value is shown on the pointer,, – Rakhmat Ullah Khan Jan 09 '15 at 14:01
-
as in the above link this is take the step of 10 and not take the step of 5 , but have the variable step that is different in different cases ..... and showing value in round .... but i need 10.00 like this – Rakhmat Ullah Khan Jan 09 '15 at 14:05
1 Answers
0
Use toFixed()
:
var x = 10;
x.toFixed(2); // outputs 10.00
![](../../users/profiles/1221792.webp)
kapantzak
- 10,937
- 4
- 36
- 54
-
var ids_value = round(jQuery("#minimum_monthly_payment_value").val(),0).toFixed(2); jQuery("#MonthlypaymentSlider").slider('value',ids_value); – Rakhmat Ullah Khan Jan 09 '15 at 13:07
-
use this but it is showing in console but not setting on sliders – Rakhmat Ullah Khan Jan 09 '15 at 13:08
-
jQuery("#MonthlypaymentSlider").slider({ step:1, //round: 1, format: { format: "#,##0.##" }, dimension: '$', planclass:'', planvalue:'', skin: "round", sliderid:1, v_value:24, – Rakhmat Ullah Khan Jan 09 '15 at 13:52
-
onstatechange: function( value ){ var current_step = jQuery('#cal_no_of_month').val(); calculatePaymentbyMonth(value); } }); – Rakhmat Ullah Khan Jan 09 '15 at 13:55