Options

It is possible to supply configuration options to the pips plugin, this allows some basic way to control how the pips/floats are handled.

        $(".slider")
            .slider()
            .slider("pips", {
                /* options go here as an object */
            })
            .slider("float", {
                /* options go here as an object */
            })
    

Pips

A list of all the options available on the pips method:

Option Values Default Description
first "label", "pip" or false "label"

Determines the style of the first pip on the slider

last "label", "pip" or false "label"

Determines the style of the final pip on the slider

rest "label", "pip" or false "pip"

Determines the style of all other pips on the slider

step number 1 / 5%

The step parameter will only generate every nth pip.
eg: If we set step: 2, then we will only get the values: 0, 2, 4, 6, 8... generated.

note: if the slider has a value over 100, step is set to 5% of the value

labels array or object or false false

Will override the values of the pips with an array of given values.
eg: [ "Monday", "Tuesday", "Wednesday", ... ]
or { "first": "Monday", "last": "Sunday" }

prefix string ""

Adds a string value before the pip label.
eg: prefix: $ => $1, $2, $3, $4, ...

suffix string ""

Adds a string value after the pip label.
eg: suffix: °c => 1°c, 2°c, 3°c, 4°c, ...

Float

A list of all the options available on the float method:

Option Values Default Description
handle boolean true

Determines if the float effect should appear on the slider handle

pips boolean false

Determines if the float effect should appear on the pips

labels array or object or false false

Will override the values of the floats with an array of given values.
eg: ["Monday", "Tuesday", "Wednesday", ... ]
or { "first": "Monday", "last": "Sunday" }

prefix string ""

Adds a string value before the float label.
eg: prefix: $ => $1, $2, $3, $4, ...

suffix string ""

Adds a string value after the float label.
eg: suffix: °c => 1°c, 2°c, 3°c, 4°c, ...