X-coordinate, relative to the viewport origin, of the left of the rectangle box.
156157158159160161162163164165166
ClientRect popupArea = popup.position(); ClientRect targetArea = root.position(); popup.css("top", targetArea.bottom() + 15 + "px") .css("left", targetArea.left() - popupArea.width() / 2 + targetArea.width() / 2 + "px"); } /** * */