cluetip是否在页面右上角的链接上工作?

问题描述:

我正在使用jquery cluetip,并且在页面的右上角有一个链接,当我点击它时,我希望工具提示出现在我点击的底部,而不是显示在屏幕中间或屏幕顶部。这里是我的代码:cluetip是否在页面右上角的链接上工作?

$('#personName').cluetip({ 
    width: '500px', 
    showTitle: false, 
    topOffset: 25, 
    leftOffset: 5, 
    positionBy: 'bottomTop', 
    cluetipClass: 'jtip', 
    activation: 'click', 
    closeText: '<img src="/Content/Images/Icons/cross.png" alt="close" />Close', 
    hoverIntent: { 
     sensitivity: 7, 
     interval: 100, 
     timeout: 500 
    }, 
    sticky: true, 
    mouseOutClose: true, 
    ajaxSettings: { 
     dataType: 'json' 
    }, 
    ajaxProcess: function (data) { 

     var html = []; 
     html.push(data.Person.Name); 
     return html.join(""); 
    } 
}); 

我试图改变positionBy为“自动”或“鼠标”,但它仍然无法正常工作。 。 cluetip根本不处理屏幕右侧的链接?

看起来cluetip在尺寸不适合屏幕时无法处理右侧的链接。

我尝试使用positionBy: 'mouse'leftOffsettopOffset并让它稍微出现在链接的左侧底部。看看http://jsfiddle.net/neo108/9CV6t/中的第二个div

希望它有帮助。

可能是你可以玩左和顶部的偏移量,并根据需要放置它。