作为一种变通方法,您可以尝试增加一个功能,如果鼠标检测已经徘徊在this post的fancybox内容....然后显示fancybox标题,如果是这样。
$(".fancybox").fancybox({
helpers: {
title: {
type: 'over'
}
},
afterShow: function() {
$(".fancybox-title").hide();
// shows/hides title on hover
$(".fancybox-wrap").hover(function() {
$(".fancybox-title").stop(true, true).slideDown(200);
}, function() {
$(".fancybox-title").stop(true, true).slideUp(200);
});
// detects if mouse is already hovering
$(".fancybox-outer a, .fancybox-outer img").hover(function() {
$(this).data('timeout', setTimeout(function() {
$(".fancybox-title").stop(true, true).slideDown(200);
}, 100));
}, function() {
clearTimeout($(this).data('timeout'));
});
}
});
见JSFIDDLE ...这似乎在IE7 +做工精细和FF
来源
2013-01-06 21:08:59
JFK
这取决于浏览器,Chrome浏览器它的工作原理像您期望的但不是FF – JFK