问题
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