Tooltip Anchored to an HTML Element

The .position( ) method in the Tooltip class accepts an array of two numbers representing x and y values (in [x, y] format), an accessor function that returns an array of two numbers, an HTML element used as an anchor point, or a selection string that selects an HTML element to use as an anchor point.

<div id="square"></div>
#square {
  background-color: red;
  height: 25px;
  width: 25px;
  position: absolute;
  left: 50%;
  top: 50%;
var tip = new d3plus.Tooltip()
  .data([{title: "Test Tooltip"}])