- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我现在正在使用库 jquery.orgchart.js。
我在我的组织结构图中显示了不同的级别,一切都很好。对于最后一个级别,人们希望看到团队中的每个人,在同一个节点中,并带有一个弹出链接以显示带有一些文本的图像。
对于节点,我们可以添加第二个菜单,如本例所示:https://github.com/wesnolte/jOrgChart/issues/37
我想知道是否可以为我在悬停或单击时添加到节点中的每个元素(每个员工)弹出一个窗口。这是来自 Bootstrap 的我的按钮对话框模式的代码:
OnHover:只显示标题,不显示数据内容:
<button type="button" class="btn btn-primary" data-toggle="popover" title="Test en cours" data-content="You gotta go through it to see there aint nothing to it. Listen to the silence."> Hover 1</button>
$(document).ready(function() {
$('[data-toggle="popover"]').popover({
placement: 'bottom',
trigger: 'click',
title: 'Sign in to the website builder',
content: 'testing 123'
});
});
也许我必须在 html 组件上绑定(bind)点击事件或使用库 jquery.orgchart.js?!如果我在页面而不是组织结构图中放置相同的按钮,效果会很好。
Image for modal that works如果您需要其他信息来帮助我,请尽管提出。
感谢您的帮助。
这是我的弹出窗口隐藏的解决方案:
$(document).ready(function() {
$('[data-toggle="popover"]').popover({
placement: 'bottom',
trigger: 'hover',
title: 'Sign in to the website builder',
content: 'testing 123',
container: 'body'
});
});
我添加了标签 container :'body',我的弹出窗口终于出现了!
最佳答案
我刚刚在这里找到了解决方案:github.com/twbs/bootstrap/issues/5889 我更新了我的帖子
关于javascript - 为我添加的每个元素在节点内容中添加模态窗口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52520608/
我来自 Asp.Net 世界,试图理解 Angular State 的含义。 什么是 Angular 状态?它类似于Asp.Net中的ascx组件吗?是子页面吗?它类似于工作流程状态吗? 我听到很多人
我一直在寻找 3 态拨动开关,但运气不佳。 基本上我需要一个具有以下状态的开关: |开 |不适用 |关 | slider 默认从中间开始,一旦用户向左或向右滑动,就无法回到N/A(未回答)状态。 有人
我是一名优秀的程序员,十分优秀!