Does something like this work?
- http://jsfiddle.net/LgLPu/
JS
$('#set_slider').bind('change', function() {
var activeLabel = $('span.ui-slider-label');
var mySlider = $(this);
var text = mySlider.find('option:selected').text();
var new_set = 'Before';
var new_off = 'After';
// changing the text does nothing
//mySlider.find('option[value="0"]').text(new_set);
//mySlider.find('option[value="1"]').text(new_off);
// You need to update the ui-slider-label spans
if(mySlider.val() == 0) {
activeLabel.text(new_set);
} else {
activeLabel.text(new_off);
}
mySlider.slider( 'refresh' ); // .trigger( 'create' )
});
HTML