fadeDuration option added #90

Closed
wants to merge 1 commit into
from
View
6 src/javascripts/jquery.tipsy.js
@@ -66,7 +66,8 @@
}
if (this.options.fade) {
- $tip.stop().css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: this.options.opacity});
+ $tip.stop().css({opacity: 0, display: 'block', visibility: 'visible'}).animate(
+ {opacity: this.options.opacity}, this.options.fadeDuration);
} else {
$tip.css({visibility: 'visible', opacity: this.options.opacity});
}
@@ -75,7 +76,7 @@
hide: function() {
if (this.options.fade) {
- this.tip().stop().fadeOut(function() { $(this).remove(); });
+ this.tip().stop().fadeOut(this.options.fadeDuration, function() { $(this).remove(); });
} else {
this.tip().remove();
}
@@ -181,6 +182,7 @@
delayIn: 0,
delayOut: 0,
fade: false,
+ fadeDuration: 'normal', // e.g. 'slow', 'normal', 'fast', 400 (ms)
fallback: '',
gravity: 'n',
html: false,