Skip to content

Commit cec9dc0

Browse files
committed
made tooltip work together with fade effect and opacity configuration variable
1 parent abe7b1f commit cec9dc0

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/tooltip/tooltip.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,13 @@
7373
],
7474

7575
fade: [
76-
function(done) { this.getTip().fadeIn(this.getConf().fadeInSpeed, done); },
77-
function(done) { this.getTip().fadeOut(this.getConf().fadeOutSpeed, done); }
76+
function(done) {
77+
var conf = this.getConf();
78+
this.getTip().fadeTo(conf.fadeInSpeed, conf.opacity, done);
79+
},
80+
function(done) {
81+
this.getTip().fadeOut(this.getConf().fadeOutSpeed, done);
82+
}
7883
]
7984
};
8085

test/tooltip/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ <h3>Slide effect</h3>
130130
<a class="trigger" title="This is the title">trigger 3</a>
131131

132132
<script>
133-
$("#slide a").tooltip({ effect: 'slide', opacity: 0.8 });
133+
$("#slide a").tooltip({ effect: 'fade', opacity: 0.5 });
134134
</script>
135135

136136
</div>

0 commit comments

Comments
 (0)