Tooltip Plugin. Allow mouse to move hover. And positioning

Tooltip Plugin. Allow mouse to move hover. And positioning

Hello,

I am creating my own toolip JQuery plugin as I need it to behave in specific ways.




So I have the following: http://codepen.io/mdmoura/pen/pbvnG


  1. When the mouse is over the "Text Tooltip" the tooltip becomes centered. I am doing this at the end of mouseenter function. Is there a better way to center the tooltip with the anchor?
  2. At the moment when I move the mouse out of the anchor the tooltip disappears. Is it possible to give, maybe, 1 second so the mouse can move over the tooltip? And the tooltip would fade out 1 second after the mouse leaves the tooltip.

    How can I do this?

At the moment my tooltip code is still a little bit confusing.

I am checking all options before I make it final.

But any suggestion is welcome.

Thank You,

Miguel