Position jquery UI dialog

前端 未结 3 1996
没有蜡笔的小新
没有蜡笔的小新 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:41

    This isn't an exact answer to your question, but you can mix 'top' with pixel values, like this:

    $('#widget').dialog({
      position: ['top', 100]
    });
    

    This will position the dialog centered along the X axis, 100 pixels down from the top.

提交回复
热议问题