jquery - 工具提示的 CSS 定位在模式弹出窗口内中断

标签 jquery css tooltip positioning modal-dialog

我正在使用 OSX 风格的“简单模式”和 tipTip 工具提示(都是 jquery)。

我的问题:第一次打开时,工具提示在模态弹出窗口中效果很好,但当关闭并重​​新打开时,它会转到左上角。

示例:http://drawnigh.org/site/new/modal/

知道是什么原因造成的吗?

最佳答案

确保以这种方式完成模态动画后提示加载:

打开 osx.js 找到这段代码并添加如下提示调用:

    open: function (d) {
        var self = this;
        self.container = d.container[0];
        d.overlay.fadeIn('slow', function () {
            $("#osx-modal-content", self.container).show();
            var title = $("#osx-modal-title", self.container);
            title.show();
            d.container.slideDown('slow', function () {
                setTimeout(function () {
                    var h = $("#osx-modal-data", self.container).height()
                        + title.height()
                        + 20; // padding
                    d.container.animate(
                        {height: h}, 
                        200,
                        function () {
                            $("div.close", self.container).show();
                            $("#osx-modal-data", self.container).show();
                            // add this line of code...
                            $("form input").tipTip({defaultPosition: "right", activation: "focus", delay: "10", fadeIn: 1});
                        }
                    );
                }, 300);
            });
        })
    },

关于jquery - 工具提示的 CSS 定位在模式弹出窗口内中断,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6501730/

相关文章:

css - 输入文本工具提示不显示

jquery - FullCalendar - dayRender 在 'removeEvents' 调用后似乎无法工作

jquery - jQuery 中的悬停功能不起作用

javascript - 更新 uri 哈希 JavaScript

html - 创建 HTML 鼠标悬停工具提示的最简单方法是什么?

java - JButton 以编程方式显示工具提示 : actionMap. get ("postTip") 为空

javascript - 如何从 url 作为字符串下载网页

jquery 焦点不会触发 css 焦点

html - 如何在调整浏览器窗口大小时滚动固定的 div

javascript - 悬停时使用CSS类显示和隐藏子div