You can use margin-left
Example:
$(function() {
var slider = $('#slider').slider({
range: 'min',
min: 3,
max: 5,
value:3,
create: function(event, ui) {
var v= $(this).slider('value');
$(this).find('.ui-slider-handle').text(v + ' years');
},
slide: function( event, ui) {
var handle = $( '.ui-slider-handle' ),
handleWidth = handle.width(),
position = handle.position(),
marginLeft;
handle.text(ui.value + ' years');
if(ui.value == 4)
marginLeft = -handleWidth/2-10;
else if(ui.value == 5)
marginLeft = -handleWidth-20;
else
marginLeft = 0;
handle.css('margin-left',marginLeft+'px');
}
});
});