jQuery悬停时显示div-鼠标输出时隐藏div
我有一个锚定标签,悬停时,我希望某个div(“mark”)出现。div不在锚定标记内jQuery悬停时显示div-鼠标输出时隐藏div,jquery,css,Jquery,Css,我有一个锚定标签,悬停时,我希望某个div(“mark”)出现。div不在锚定标记内 $(".mark").on({ mouseover: function() { $(".icontent").stop().show(1000); }, mouseout: function() { $(".icontent").stop().hide(1000); } }) HTML格式如下: <a href="#" cl
$(".mark").on({
mouseover: function() {
$(".icontent").stop().show(1000);
},
mouseout: function() {
$(".icontent").stop().hide(1000);
}
})
HTML格式如下:
<a href="#" class="mark"></a>
<div class="icontent">
<p>
lorem ipsum dolor sit amet......
</p>
</div>
$(".mark").on({
mouseover: function() {
$(".icontent").stop().show(1000);
},
mouseout: function() {
$(".icontent").stop().hide(1000);
}
})
我爱你,我爱你。。。。。。
$(".mark").on({
mouseover: function() {
$(".icontent").stop().show(1000);
},
mouseout: function() {
$(".icontent").stop().hide(1000);
}
})
当鼠标悬停在“.mark”上时,“.icontent”应显示。当鼠标退出时,“.icontent”应再次隐藏。是否也可以向其添加1秒的过渡
$(".mark").on({
mouseover: function() {
$(".icontent").stop().show(1000);
},
mouseout: function() {
$(".icontent").stop().hide(1000);
}
})
谢谢
$(".mark").on({
mouseover: function() {
$(".icontent").stop().show(1000);
},
mouseout: function() {
$(".icontent").stop().hide(1000);
}
})
$(".mark").on({
mouseover: function() {
$(".icontent").stop().show(1000);
},
mouseout: function() {
$(".icontent").stop().hide(1000);
}
})
这应该可以工作:)hover()在这里可以很好地工作:
$(".mark").on({
mouseover: function() {
$(".icontent").stop().show(1000);
},
mouseout: function() {
$(".icontent").stop().hide(1000);
}
})
$('.mark').hover(function() {$('.icontent').show(1000)}, function() {$('.icontent').hide(1000)});
给你
$(".mark").on({
mouseover: function() {
$(".icontent").stop().show(1000);
},
mouseout: function() {
$(".icontent").stop().hide(1000);
}
})
HTML
$(".mark").on({
mouseover: function() {
$(".icontent").stop().show(1000);
},
mouseout: function() {
$(".icontent").stop().hide(1000);
}
})
范例
$(".mark").on({
mouseover: function() {
$(".icontent").stop().show(1000);
},
mouseout: function() {
$(".icontent").stop().hide(1000);
}
})
您还可以分别使用
mouseover
和mouseout
。:动画的
和停止
添加是为了防止聪明的人将鼠标反复移动到锚上或离开锚。如果出现多次悬停,而不是不必要地重复动作,则需要在此停止out@dmi3y谢谢,问错了。但是现在我丢失了我想链接到的jQuery示例!未捕获引用错误:$未定义(function(){var del=200;$('.info').hide().prev('.问号').hover(function(){$(this).next('.info').stop('fx',true).slideToggle(del);})();工作对我来说是可行的,但是页面上没有“mark”或“icontent”类的内容。
$(".mark").on({
mouseover: function() {
$(".icontent").stop().show(1000);
},
mouseout: function() {
$(".icontent").stop().hide(1000);
}
})
$(".mark").mouseover(function() {
$('.icontent').fadeIn(1000);
}).mouseout(function(){
$('.icontent').fadeOut(1000);
});