moving index to jquery example