Save position for highlight using JS