Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#10916 closed bug (notabug)

jquery dialog position attribute not working. But It works in previouse versions.

Reported by: vergules Owned by:
Priority: minor Milestone: none
Component: ui.dialog Version: 1.11.2
Keywords: Cc:
Blocked by: Blocking:


<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" ""> <html xmlns=""> <head>


<script type="text/javascript" src=""></script> <link type="text/css" rel="stylesheet" href="" /> <script type="text/javascript" src=""></script>

</head> <body>

<form id="form1" action="TestDlg.htm">

<button id="btnShowDlg" onclick="showDialog()" type="button">Open</button>

</form> <div id="dlgTest" style="display:none" title="Test">

Position attribute not working.


</body> <script type="text/javascript">

function showDialog() {

var dlg = $('#dlgTest'); dlg.dialog({

modal: false, height: 200, width: 400, open: function(event, ui) {

setPosition(dlg); dlg.dialog("option", "appendTo", "#form1");


}); dlg.dialog("open"); return false;

} function setPosition(dlg) {

var thePosition = {

my: "left top", at: "left+100 top+30", collision: "fit fit"

} dlg.dialog({ position: thePosition });


</script> </html>

Change History (2)

comment:1 Changed 8 years ago by Scott González

Resolution: notabug
Status: newclosed

You're mixing versions. You cannot use a 1.10.4 CSS theme with the 1.11.2 JS. If you continue having problems, please provide a reduced test case using jsbin or jsFiddle (as requested in the red box, so we can actually see it without having to copy paste a bunch of code).

comment:2 Changed 8 years ago by Scott González

Actually, I see your real problem. You're only providing partial information. If you don't specify the of, then it has no idea how to position, so it does nothing.

Note: See TracTickets for help on using tickets.