making the slider work on active slide rather than pagination