我一直在使用这个脚本http://jqueryfordesigners.com/coda-popup-bubbles/
并试图用此修复根据其中用户的鼠标在网页上以定位气泡:
$([trigger.get(0), info.get(0)]).mouseover(function (e) {
if (hideDelayTimer) clearTimeout(hideDelayTimer);
if (beingShown || shown) {
// don't trigger the animation again
return;
} else {
// reset position of info box
beingShown = true;
info.css({
top: e.pageY,
left: e.pageX,
display: 'block'
}).animate({
top: '-=' + distance + 'px',
opacity: 1
}, time, 'swing', function() {
beingShown = false;
shown = true;
});
}
代替出现在鼠标的e.pageY和e.pageX是泡沫的,它增加了在除了其中该触发是那些值,因为气泡的相对触发器内绝对定位。
我如何才能让泡沫鼠标的位置?