0

我有一个动态加载的 iframe。我希望当用户将鼠标悬停在某些元素上时显示 qtips,并且一旦进入元素,qtips 将跟随光标。我不能使用该选项target: 'mouse',因为 iframe 内的 qtips 固定定位到父容器。我得到了一些有用的东西,除了提示仍然从我的光标移位,仅在 y 轴上,在 FF 中距离最远,IE 是最近的。我知道这不是实现它的正确方法,因此不胜感激。谢谢!

$("#pageFrame").load(function() {
    var pageFrameContent  = $(this).contents()[0];
    $("div.extra", pageFrameContent)
    .mouseenter(function(){
    $(this).mousemove(function(e){
        $(this).qtip({
                position: {
                    target: [e.screenX,e.screenY]
                },
                show: {
                    solo: true,
                    ready: true,
                    delay: 0
                },
                hide:{
                    event: 'click mouseleave'               
                },
                content: 'Tips content',
                style: 'ui-tooltip-shadow ui-tooltip-rounded'
        });
    });
});
});
4

1 回答 1

1

Craig 在qTip2 论坛上回答了这个问题。事实证明,如果您可以在 iframe 中创建提示,那是最好的。

于 2011-09-02T21:32:54.293 回答