定位jquery UI对话框 [英] Position jquery UI dialog
问题描述
如何特定地放置jquery UI对话框,以使其转到未由中心,顶部等定义的位置.
How can I position the jquery UI dialog SPECIFICALLY, so that it goes to a position not defined by center, top, etc.
谢谢,我试图做到尽可能具体.
Thanks, I have tried to be as specific as posible.
推荐答案
使用position
选项: http://jqueryui.com/position/
指定对话框的显示位置.可能的值:
Specifies where the dialog should be displayed. Possible values:
1)代表视口中位置的单个字符串:"center","left",
右",顶部",底部".
2)包含x,y坐标的数组
相对于视口左上角的像素偏移量对(例如[350,100])
3)包含x,y个位置字符串值的数组(例如
['right','top']代表右上角).
1) a single string representing position within viewport: 'center', 'left',
'right', 'top', 'bottom'.
2) an array containing an x,y coordinate
pair in pixel offset from left, top corner of viewport (e.g. [350,100])
3) an array containing x,y position string values (e.g.
['right','top'] for top right corner).
例如:$( ".selector" ).dialog( "option", "position", [350,100] );
这篇关于定位jquery UI对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!