定位jQuery对话框 [英] Position jQuery dialog box
本文介绍了定位jQuery对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试了上百万种解决方案,但似乎都没有用.我只需要从页面顶部推送约50px的jQuery对话框即可.有什么想法吗?
I've tried a million solutions and none seem to work. I just need to push my jQuery dialog box about 50px from the top of the page. Any ideas how?
function message() {
$("#message").dialog({
title: 'Title here',
draggable:false,
minHeight:100,
resizable: false
});
}
推荐答案
有一个 position 参数,它接受具有X和Y坐标的数组:
There's a position parameter for that, it accepts an array with X and Y coordinates :
function message() {
var myPos = [ $(window).width() / 2, 50 ];
$("#message").dialog({
title: 'Title here',
draggable:false,
minHeight:100,
position: myPos,
resizable: false
});
}
这篇关于定位jQuery对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文