jQuery Tools Tooltip broken with jQuery 1.8.1

2019-09-20 10:27发布

I had jQuery Tools Tooltips working with jQuery 1.7.1. However, I had to update my jQuery to 1.8.1 to address a sweet IE8 and lower problem. The tooltips no longer work with jQuery 1.8.1. Anyone know a quick fix? Thanks.

Update - here is the JS I use to call the plugin. Also using livequery.

$(function() {

    $("th a[title], a.tipin[title]").livequery(function(){
        $(this).tooltip({
            offset: [-30, 0],
            opacity: 0.9
        }).dynamic({ bottom: { direction: 'down' } });
    });

    $("a.tip[title]").livequery(function(){
        $(this).tooltip({
            offset: [0, 30],
            position: 'center right',
            opacity: 0.9
        }).dynamic({ bottom: { direction: 'down' } });
    });});

2条回答
女痞
2楼-- · 2019-09-20 11:06

The problem with jQuery 1.8 is a change from outerWidth() to outerWidth(true). You cannot call the function without a parameter anymore. Set true or false for margins or without margins.

jQuery Tools isn't updated yet, but I changed all calls of outerWidth / outerHight by myself in the tooltips and now it is working again.

查看更多
Lonely孤独者°
3楼-- · 2019-09-20 11:07

So I was also using jQueryUI 1.8.19 for some other functionality. I updated jQueryUI to 1.9.1 to play around with its tooltip functions and this fixed my problem with jQuery Tools Tooltips. I guess there was some kind of conflict in jQueryUI 1.8?

查看更多
登录 后发表回答