Updating index with jquery