Tooltipster plugin - center position tooltip

I am using the Tooltipster plugin ( http://calebjacob.com/tooltipster/#demos ) to display tooltips . However, a tooltip is only shown at the top / bottom of the item I'm hanging.

This is the code I have to display a tooltip when hovering over an item, and it works well

$(".tooltip").tooltipster({
  animation: "fade",
  delay: 200,
  theme: ".tooltipster-default",
  touchDevices: true,
  trigger: "hover",
  interactive: true,
  position: "top"
});

However, I want to display a tooltip in the center of the hovering element.

In the Tooltipster documentation, the position parameter does not support center positioning.

ToolTipster Position Documentation:

 right, left, top, top-right, top-left, bottom, bottom-right, bottom-left

Does anyone know how to center a tooltip in an element?

+4
1

, css , .

Ready:

elem.tooltipster({
    arrow: false,
    functionReady: function(){
          var offset = $(this).offset();
          $(".tooltipster-base").offset(offset);
    },
    theme: 'tooltipster-shadow'
});
+2

All Articles