jQuery Version: 1.10.2
JQuery UI Version:1.11
Dialog Position Setting Code:
position{my: "Center Top", at: "Center Top", Of:window}
----------------------------------------------------------------------------------------
The following are just my personal records.
Since I did the project, I found that the version of the jquery UI for the modified project was relatively low, using the jquery UI 1.11 instead of the jquery UI that currently modifies the project, and there is a dialog.js in the project that sets the dialog basic set parameters. When setting Position: "Center", there is a problem, dialog always stay in the upper left corner.
Dialog positon Default options:
{my: "Center", at: "Center", Of:window}
After reviewing the. Position () in the jquery UI API , or the. Position () in Chinese, it was discovered that: My,at are all defined horizontally, vertically oriented, typed as strings, and images from Chinese. Position ()
If my position is set to:
position:{my: "Center", at: "Top", Of:window}
In the second pop-up dialog, dialog can only see the bottom button, can not see the contents of dialog, it is not normal.
:.
The dialog position as follows, you can solve the problem of the center of the dialog head:
position:{my: "Center Top", at: "Center Top", Of:window}
JQuery UI 1.11 Dialog Vertical Top, centered horizontally (head centered)