created index slider with js