每当鼠标进入 div 时,我想在 div 旁边出现一个 twitter bootstrap 样式的弹出框,并在鼠标退出 div 时消失。
我的部分中有以下内容:
$('#bizhover').hover(
function() {
$(this).popover({ html: true, placement: "right" });
},
function() {
$(this).popover('hide');
}
);
我相信通过使用放置在 div 中的“选择”(jquery 插件)样式下拉菜单,事情可能会有些复杂,如下所示:
创建它的代码类似于:
<div id = 'bizhover', style = 'margin-right:85px;', class = 'pop_html', title = 'Instructions', data-content = "blah blah blah"> CHOSEN DROP DOWN </div>
我注意到,如果我的鼠标退出到下拉列表的顶部,弹出窗口仍然存在。如果我将鼠标移到下方或侧面,弹出框会按预期消失。
任何建议将不胜感激。