[javascript] Get the position of a div/span tag