See this thread for two options: Slider next - previous buttons http://groups.google.com/group/jquery-ui/browse_thread/thread/985be4149ad2debe
- Richard On Tue, Mar 31, 2009 at 6:43 AM, kallep <[email protected]> wrote: > > Hello everybody on this list. This is my first post here. I am new to > Jquery and have during the last days been trying to get an > understanding for how everything works, but it is still some concepts > I do not get. > > In the code below I have successfully been able to add next and > previous buttons to the Jquery UI slider. The problem is that I'm not > able to get the new values back. > > In other words I can click the Next button ones and it works but > nothing happens if I click a second time. > > $(function() { > $("#slider").slider({ > range: "min", > min: 1, > max: 10, > value: 1, > slide: function(event, ui) { > > > //next button > $("li.next").click(function(){ > $("#slider").slider( 'value' , [((ui.value) + 1)] > ) > }); > //previous button > $("li.previous").click(function(){ > $("#slider").slider( 'value' , [((ui.value) > - 1)] ) > }); > > } > }); > }); > </script> > </head> > <body> > <ul id="nav"> > <li class="next"><a href="#">next</a></li> > <li class="previous"><a href="#">previous</a></li> > </ul> > > <div id="slider"></div> > </body> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~---
