I'm using jquery-ui version 1.11.0 to create dialogs. I can create a dialog as expected:
onClick: function(e){
$('#result').dialog({height:400, width:315, position:{at:"center", of:"#"+e.key}})
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function () {
if(xmlhttp.status == 200 && xmlhttp.readyState == 4){
response = xmlhttp.responseText;
$('#result').dialog().html(response);
}
};
xmlhttp.open("GET", "floorplan.php?cube=" + encodeURIComponent(cubes[e.key]), true);
xmlhttp.send();
}
The dialog opens and is assigned the response as expected. However, the dialog's position defaults to the center of the window even though I've passed a selector to the position option.
I've used console.log() and alert() to verify that e.key is the id of the area element that I've clicked on to fire this event.
Any suggestions? The documention says I should be able to pass a Selector to the position(of:) option. Has anyone else been able to get this to work as expected?