c# - How to change the position of jquery dialog box into center? -
i have jquery dialog box showing content of div. problem dialog box appearing @ bottom of page whenever link button clicked link button @ bottom of page want appear @ top of page user don't have scroll down find dialog box.
here aspx code:
<a href="#" onclick="opendialog('#divnominees','add nominee')">
jquery code:
function opendialog(obj,title) { $(obj).dialog({ title: title, modal: true }) $(obj).parent().appendto($("form:first")); var p = $(obj).parent(); }
i appreciate if me out of because wasted whole morning solving issue.
thanks in advance.
you keep div not nested other tables/divs or whatever. in below sample, tblouter id of table wanted dialog box centered.
$("#divnominees'").dialog({ modal: true, position: { my: "center", at: "center", of: $("#tblouter") }, title: "nominees", dialogclass: "ui-dialog-content" });
Comments
Post a Comment