我使用Flowplayer.org Tooltips,我希望它在4秒后消失。jQuery工具提示,隐藏后..时间
这是它的代码,任何人都可以帮忙吗?
$("#search").tooltip({ offset: [45, 170], effect: 'slide' });
谢谢:)
我使用Flowplayer.org Tooltips,我希望它在4秒后消失。jQuery工具提示,隐藏后..时间
这是它的代码,任何人都可以帮忙吗?
$("#search").tooltip({ offset: [45, 170], effect: 'slide' });
谢谢:)
编辑。 借用另一个堆栈溢出问题。 它在这里工作:http://jsfiddle.net/mmRu2/
jQuery.fn.delay = function(time,func){
return this.each(function(){
setTimeout(func,time);
});
};
$('#search').delay(2000, function(){
$('#search').fadeOut('fast');
}
);
试试下面的回调...希望它会工作......但我会褪色不透明度0.8 ... u能改变休息...
onShow: function() {
this.getTrigger().fadeTo("slow", 0.8);
}
这些答案都不适用于我。贾马尔接近了,但错过了重要的部分。
工作代码4秒后隐藏工具提示:
<script>
$("s.howTooltip").tooltip({
//start when the tooltip is shown
onShow: function() {
//store a reference to this
var self = this;
//start a timeout for 4seconds
setTimeout(function() {
//get a reference to the tooltip and hide it.
self.getTip().hide();
}, 4000)
}
})
</script>
getTip()突然从哪里来? – bart 2017-10-20 21:46:26
哈哈,刚才的搜索栏加载:) – Kyle 2010-06-11 07:41:58
编辑后淡出慢慢地,并把测试的链接给你。 – 2010-06-11 09:03:21