Update slider.js

Update to prev - still trying to solve error that occurs potentially over five slides.