Jump to the closest anchor for a selected element