JQuery UI 1.11 Dialog Vertical Top, centered horizontally (head centered)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.