0

I need the following values to be shown, currently not possible with the linear slider.

Min: $0

Increments ($100): $100; $200; $300; $400; $500; $600; $700; $800; $900 

Default: $1,000

Increments ($1,000): $2,000; $3,000; $4,000; $5,000; $6,000; $7,000; $8,000; $9,000; $10,000;

Max: $10,000+

So I have total of 21 non-linear values to select in my snap to increment slider. Is there any way to manually input each of these values in the jQuery code? Or possible to put two algorithms for the the different increment values ($100 and $1,000) in the same slider?

Thank you.

Current code added below. It's not much… value should be value:1000, but for now has been set to 5,000 because I want the default value to be in the middle of the slider. From $1,000 to $0 - $100 step increment is ok but from $1,000 to $10,000+ it's not good for the users.

<title>Budget Slider</title>
  <script>
  $(function() {
    $( "#slider" ).slider({
      value:5000,
      min: 0,
      max: 10000,
      step: 100,
      slide: function( event, ui ) {
        $( "#amount" ).val( "$" + ui.value );
      }
    });
    $( "#amount" ).val( "$" + $( "#slider" ).slider( "value" ) );
  });
  </script>
Felix10
  • 3
  • 3
  • 1
    "I need.." is not a good way to describe your question. Show us the code that you have written so far. – Rahul Desai Jan 07 '14 at 08:42
  • New here. Added the current code but it's not much. Is there a way to add each of the values I want manually? Like say - value1:0, value2:100 … value 21:10,000+? Thank you. – Felix10 Jan 07 '14 at 08:57

1 Answers1

0

It's better you to search more.

Solution is stated here:

JQuery Slider, how to make "step" size change

You may also fix the values as stated here:

jQuery UI slider fixed values

Community
  • 1
  • 1
Cem Ekici
  • 364
  • 1
  • 8