Update slider.js

Bug fixes for 1 slide showing slideshow