Added visibility check to pause the slider if it is outside the viewport, closes #7