jQuery UI slider with labels

If you want a jQuery UI slider with labels that looks like this:

Then this JavaScript code might help you:

$('#slider').slider({
  min: 1,
  max: 20,
  step: 1,
  value: 16,
  create: function(event,ui){
    $('a.ui-slider-handle').css({'text-decoration':'none','text-align':'center'}).text($(this).slider("value"));
  },
  slide: function(event,ui){
    $('a.ui-slider-handle').css({'text-decoration':'none','text-align':'center'}).text(ui.value);
  }
});