Pure JavaScript slider