Does anyone know what type of (jQuery?) animation does Stackoverflow use for its Tag popup? By Tag popup I mean when you hover over a Tag in Stackoveflow a popup appears, the animation starts from top left to bottom right, does anyone know which type of animation it uses?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
.show( time )
method
jsBin demo
$('a.post-tag').hover(function(){
var $this = $(this);
var offset = $this.offset();
var myPos = {X: offset.left, Y:offset.top+26};
$('#tag-menu').css({left:myPos.X, top:myPos.Y, width:300, height:200}).show(400);
// ^^^TADA !!
}, function(){
$('#tag-menu').stop(1,1).hide();
});