4

I want to show the number of ticks in my jquery ui slider, is there a way to do this?

For example I have a slider with a max of 100, I want it some what like this

0--------50--------100

minus the dashes of course.

Dennis Martinez
  • 6,344
  • 11
  • 50
  • 67

1 Answers1

4

The easiest way, in my mind, is to put this above/below the slider:

<div id="slider_steps"> <span>0</span> <span>50</span> <span>100</span> </div>
<div id="slider"></div>

Then style the labels appropriately. You could also insert the labels into the #slider itself, but this will probably force the slider to be thicker for readability:

<div id="slider"> <span id="step">50</span> </div>
div#slider span#step {position:relative; left:50%;}
Karl Andrew
  • 1,563
  • 11
  • 14
  • Ah yeah I had this in mind, but I was aiming for possibly a jquery ui slider option that is easily turned on and off such as like `Labels:true` or something along those lines. – Dennis Martinez May 31 '11 at 15:04
  • That was my first thought; but the implementation is probably not worth the trouble. – Karl Andrew May 31 '11 at 15:11