Skip to content

Commit 0b32329

Browse files
author
Caolan McMahon
committed
Issue jquerytools#363 - disable tooltip fade effect in IE, unless fadeIE config option set to true
1 parent 9257b9e commit 0b32329

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

src/tooltip/tooltip.js

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
delay: 30,
2525
opacity: 1,
2626
tip: 0,
27+
fadeIE: false, // enables fade effect in IE
2728

2829
// 'top', 'bottom', 'right', 'left', 'center'
2930
position: ['top', 'center'],
@@ -66,13 +67,26 @@
6667
],
6768

6869
fade: [
69-
function(done) {
70+
function(done) {
7071
var conf = this.getConf();
71-
this.getTip().fadeTo(conf.fadeInSpeed, conf.opacity, done);
72-
},
73-
function(done) {
74-
this.getTip().fadeOut(this.getConf().fadeOutSpeed, done);
75-
}
72+
if (!$.browser.msie || conf.fadeIE) {
73+
this.getTip().fadeTo(conf.fadeInSpeed, conf.opacity, done);
74+
}
75+
else {
76+
this.getTip().show();
77+
done();
78+
}
79+
},
80+
function(done) {
81+
var conf = this.getConf();
82+
if (!$.browser.msie || conf.fadeIE) {
83+
this.getTip().fadeOut(conf.fadeOutSpeed, done);
84+
}
85+
else {
86+
this.getTip().hide();
87+
done();
88+
}
89+
}
7690
]
7791
};
7892

0 commit comments

Comments
 (0)