0

以下两个位置设置有什么区别?

设置一:(易懂)

$("#myinput").autocomplete({
    source: myArray,
    position: { my: "**left top**", at: "right top" }
});

设置2:(令人困惑)

$("#myinput").autocomplete({
    source: myArray,
    position: { my: "**top left**", at: "right top" }
});
4

2 回答 2

4

Check out this diagram for a detailed view:

enter image description here

于 2012-08-24T01:27:08.543 回答
1

According tot he jQuery UI docs:

Defines which position on the element being positioned to align with the target element: "horizontal vertical" alignment.

So your first example would be left horizontally, top vertically while your second example would be top horizontally and left vertically.

于 2012-08-24T01:26:36.207 回答