Skip to content

Instantly share code, notes, and snippets.

@osanchezh
Last active December 19, 2015 19:18
function showMessageDialog(sourceElement, jqr) {
var x = getOffset(document.getElementById(sourceElement)).left;
var y= getOffset(document.getElementById(sourceElement)).top;
var parentSource = jqr.parent();
var parent = jqr.parent();
parent.find('.ui-dialog').each(function() {
jQuery(this).css('position', 'absolute');
jQuery(this).css('width', '780px');
});
parent.addClass("autoWidthDialog");
parent.offset({
top: y-85 //change Y position in pixels
,left: x-3 //change X position in pixels
});
MessageDialog.show();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment