jQuery UI Slider: unable to enable
676926Nov 10 2009 — edited Nov 18 2009Hi - I am using a jQuery UI slider for the first time. I have included the js/css files in the page template header; and expanding in Firebug shows that it is sourcing content for each file.
The Slider body appears, but I cannot make the slider control appear, whatever settings I try. It seems to be disabled.
The text field (P4000_SLIDER) is a standard text field with no additional changes - when the appears it appears briefly as a text field before changing to the slider body.
This is the javascript in my page heading (copied from a www example): if I change horizontal/vertical then the control changes; but nothing else makes any difference.
Do I need to do something additional to enable the control?
Thanks!
Mark
<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){
var slide_int = null;
function update_slider(){
var offset = $('.ui-slider-handle').offset();
var value = $('#P4000_SLIDER').slider('option', 'value');
$('#current_value').text('Value is '+value).animate({top:offset.top }, 1000 )
$('#current_value').fadeIn();
}
$('#P4000_SLIDER').slider({
animate: true,
step: 30,
min: 30,
orientation: 'horizontal',
max: 180,
start: function(event, ui){
$('#current_value').empty();
slide_int = setInterval(update_slider, 30);
},
slide: function(event, ui){
setTimeout(update_slider, 10);
},
stop: function(event, ui){
clearInterval(slide_int);
slide_int = null;
}
});
});
//]]>
</script>