jQuery UI Slider Uneven Steps or Increments

September 19, 2013 10:39 am Published by Leave your thoughts

Here’s how to use the UI Slider from jQuery to have uneven steps or increments.

Check out the demo!

Have an array of values you want to use.

var amts=[50,100,150,200,225,250,300];

Have the slider increment from 0 to the length of the array, with steps of 1. output the value from the index of the array instead of using the slider’s actual value.

This way the increments and steps are evenly distributed. after that you can just grab the value of the label or save it to a var.

    change:function(event, ui){
    slide:function(event, ui){

Easy, ain’t it?
Check out the demo!

Tags: , , , , , , ,

Categorised in:

This post was written by admin

Leave a Reply

Your email address will not be published. Required fields are marked *