我正在使用 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/