Position jquery UI dialog

前端 未结 3 1999
没有蜡笔的小新
没有蜡笔的小新 2021-02-19 21:02

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.

3条回答
  •  孤独总比滥情好
    2021-02-19 21:21

    Using the position option : http://jqueryui.com/position/

    Specifies where the dialog should be displayed. Possible values:

    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).

    For example : $( ".selector" ).dialog( "option", "position", [350,100] );

提交回复
热议问题