1

我正在使用 jquery 线索提示,我在页面的右上角有一个链接,当我点击它时,我希望工具提示显示在我点击的底部,但它显示在中间屏幕或屏幕顶部。这是我的代码:

$('#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 更改为“auto”或“mouse”,但它仍然不起作用。. 线索提示根本不处理屏幕右侧的链接吗?

4

1 回答 1

1

当尺寸不适合屏幕时,提示提示在右侧处理链接时遇到问题。

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

希望能帮助到你。

可能您可以使用左侧和顶部偏移量并根据需要定位它。

于 2012-03-22T01:02:49.697 回答