adding jquery and updating index