I'm working on a tooltip plugin and have created my own mouseEnter, mouseMove and mouseOut functions that way the mouseMove function only triggers if I don't specify where the tooltip is going to be position in relation to the element.
However, I'm having some issues getting the e.PageY and e.pageX values because it says that e is undefined. I was told that if I don't pass in e to the function then it gets created automatically. I've never heard of this before so I'm not quite sure if I'm doing this right or wrong. Here's the mouseMove function that I've created.
function _mouseMove(e)
{
tooltip.text(title);
var position = $(this).data('position');
var top = e.pageY + 75;
var left = e.pageX + 10;
tooltip.css('top', top).css('left', left).show();
}
Is there something else that I'm supposed to do in order to get these values since I'm not using $(this).mousemove()?
Edit: Here's how I'm calling the mousemove event:
if (options.position == "" || options.position == undefined || options.follow == true)
{
_mouseMove();
}