开发者

jQuery UI modal dialog, position module underneath/relative to link

开发者 https://www.devze.com 2023-03-12 06:18 出处:网络
i am trying to position my jQuery dialogue modal relative to the to the link that reveals the module. What I ide开发者_Go百科ally like is to open the module directly centered underneath the link.

i am trying to position my jQuery dialogue modal relative to the to the link that reveals the module. What I ide开发者_Go百科ally like is to open the module directly centered underneath the link.

Below is my code, how would I change this to get the desired effect?

$("#tooltest").bind("click", function (e) {
  $("#LightboxTool").dialog({ 
    show: 'fade',
    hide: 'fade',
    modal: false,
    width: 320,
    minHeight: 180  
  });
  return false;
});


keithnorm has answered this greatly in a jQuery forum as follows:

$('#dialog').dialog({
    position: { 
        my: 'top',
        at: 'top',
        of: $('#some_div')
    }
});

An also this question looks a like a dup of this.

0

精彩评论

暂无评论...
验证码 换一张
取 消