Slider fix

Job ID: 34078496

Budget: $30 – $250 AUD

I have a one-page HTML file linked to CSS and JS files. It has two sliders that play automatically. I want the sliders to only start when they appear in the viewport. So, each slider will keep going and playing slides until the user scrolls away and the slider is no longer in viewport. When it is no longer in viewport, I want it to reset and play again from the start when the user scrolls it back into the viewport again. I want it to reset ONLY if all slides have finished playing.
Related categories: PHP JavaScript CSS HTML jQuery / Prototype