Update index.js

on tap function next prev