seiyria / bootstrap-slider

A slider control for Bootstrap 3 & 4.
http://seiyria.github.io/bootstrap-slider/
Other
3k stars 1.14k forks source link

Typo in Boostrap-Slider API Example page - Example 14 #868

Closed jespirit closed 5 years ago

jespirit commented 5 years ago

Issues

NOTE: Before filing a new issue, please search through the open issues list and check to see if an existing issue already exists that describes your problem. If so, leave a comment within that issue with the checklist items described below.

Please make sure you include the following in your issue report where appropriate:

Details

/* Example 14 */
$("#ex14").slider({
    ticks: [0, 100, 200, 300, 400],
    ticks_labels: ['$0', '$100', '$200', '$300', '$400'],
    ticks_positions: [0, 30, 70, 90, 100],
    ticks_snap_bounds: 20,
    value: 200,
    reversed: true
});
<input id="ex14" type="text" data-slider-ticks="[0, 100, 200, 300, 400]"
  data-slider-ticks-snap-bounds="30"
  data-slider-ticks-labels='["$0", "$100", "$200", "$300", "$400"]'
  ticks_positions="[0, 30, 60, 70, 90, 100]" />

Typo: The slider uses five (5) values 0, 30, 70, 90, and 100 for ticks_positions while in the HTML example it includes six (6) values - the error being the value 60.

In addition, the slider uses the reversed option while in the HTML example it does not specify that. Should the example be reversed or not?

jespirit commented 5 years ago

The slider should not be reversed because there's no mention of it on the page.