I have created a basic slider for a form, once one section of the form is complete, the user clicks 'Next' and the next section slides in....if the user wants to go back they click prev etc.
My porblem is that if a user starts out by clicking "Prev" then the form slides the wrong way and shows blank, so I need to disable the buttons when on the first and last section of the form.
My code for the slider is simple:
$(document).ready(function(){
//next/prev buttons
$("#calc_next").click(function(){
$("#calc_container").animate({
left: '-=800'
});
});
$("#calc_prev").click(function(){
$("#calc_container").animate({
left: '+=800'
});
});
You can see an example of my work here http://www.samskirrow.com/projects/distr/index3.html
and a jsfiddle here http://jsfiddle.net/5udRZ/