jQuery Tools Tooltip broken with jQuery 1.8.1

吃可爱长大的小学妹 提交于 2020-01-26 03:57:28

问题


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' } });
    });});

回答1:


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?




回答2:


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.



来源:https://stackoverflow.com/questions/13478277/jquery-tools-tooltip-broken-with-jquery-1-8-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!