有没有办法让 i 从翻转区域触发多个弹出框
Is there a way the i can trigger multiple popovers from on roll over area?
基本上,我尝试多次调用相同的JavaScript函数以触发多个弹出窗口。
任何帮助将不胜感激:)
Javascript:
$(function(){
$('[rel="popover"]').popover({
container: 'body',
html: true,
content: function () {
var clone = $($(this).data('popover-content')).clone(true).removeClass('hide');
return clone;
}
}).click(function(e) {
e.preventDefault();
});
.HTML
<a href="#" rel="popover" title="Popover Title" data-placement="top"data-trigger="hover" data-popover-content="#Popover_Content">
<div id="Popover_Content" class="hide">
Popover Content
</div>
<area shape="rect" name="Rollover_Area" coords="378,439,491,462" href="#">
</a>
.CSS
#Popover{
position: relative;
bottom: 500px;
left: 500px; }
我认为您在此代码片段中询问此函数 https://jsfiddle.net/68k33bqh/1/
function attachPopover(e){
$(e).popover({
html:true,
content:function(){
var a = $(e).clone();
attachPopover(a[0]);
return a;
}});
}
attachPopover($('[data-toggle="popover"]')[0]);
$(document).click(function(e){
if($('[data-toggle="popover"]').index(e.target)>-1) attachPopover(e.target);
});
相关文章:
- onkeyup无法动态创建多个文本区域
- FabricJs-限制主对象内添加对象的移动区域
- 通过点击按钮翻转缩略图
- 具有所有样式的文本正在复制到可编辑文本区域
- 如何为高图中的区域线创建z索引
- 在文本区域POST后解码JSON
- 在文本区域中使用jQuery.text()保持换行符
- IE中的CSS翻转动画:翻转的一面显示镜像内容
- ng在下拉列表和文本区域提交
- 使用fabric.js从矩形区域获取对象,并将该区域绘制到画布上
- 当用户按下回车键时,自动在text区域/text中插入消息
- 将文本插入光标所在的文本区域
- 离开页面导航后保留文本区域内容
- 不能在图像中的地图标记中使用花式框jquery插件的区域标记
- Javascript-在文本区域中断,但不在段落中中断
- 当选择值x时,Javascript需要在正确的位置显示文本区域,从而循环通过具有选择选项的表单
- 测试文本区域中的特定文本格式
- 画布中绘制的矩形区域的弹出工具提示
- 有没有办法让 i 从翻转区域触发多个弹出框
- 限制css翻转的悬停区域