I am trying to add control buttons to the jQuery UI slider but cannot make it work.
Can anyone see what I'm doing wrong here:
$(function() { var gmin = 1; var gmax = 500; $( "#slider" ).slider({ value:5, min: gmin, max: gmax, step: 1, slide: function( event, ui ) { $( "#donate_amount_label span" ).html( "Β£" + ui.value ); } }); $( "#donate_amount_label span" ).html( "Β£" + $( "#slider" ).slider( "value" ) ); $( "#" ).val( $( "#slider" ).slider( "value" ) ); $('#down').click(function() { var s = $("#slider"); s.slider('value', s.slider('value') + s.slider( "step" ) ); }); });
The slider works fine and the values ββare updated, but when you click the #down link, nothing happens with the scroll bar. I would like it to go one step further by clicking on the #down link.
Thanks Pete
Peter J Harrison
source share