在我添加的每个元素的节点内容中添加模态 window

Add modal window in node content for each element I add

我现在在图书馆工作 jquery.orgchart.js。

我在我的组织结构图中显示了不同的级别,一切都很好。 对于最后一个级别,人们希望在同一节点中看到团队中的每个人,并使用 link 弹出窗口显示带有一些文本的图像。

对于节点,我们可以添加第二个菜单,如本例所示:https://github.com/wesnolte/jOrgChart/issues/37

我想知道是否可以为悬停或单击时添加到节点中的每个元素(每个员工)弹出一个窗口。 这是 bootstrap 中我的按钮对话框的代码:

OnHover : 它只显示标题而不显示 data-content :

<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 组件上绑定点击事件或使用库 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' 
                       });

                    });

我添加标签容器 :'body' 我的弹出窗口终于出现了!

我刚刚在这里找到了解决方案:github。com/twbs/bootstrap/issues/5889 我更新了我的 post