[jQuery] Re: Dialog position : relative

2009-06-13 Thread Frodo
Try something like this (not perfect in all modes with all all borders and paddings, but close enough in many cases) var i = $(#myId); var top = 0; var left =0; var x=0; //x is just for avoiding infinite loops var oParent = i[0]; while (oParent x++ 10) { top += oParent.offsetTop -

[jQuery] Re: Dialog position : relative

2009-05-02 Thread Richard D. Worth
Currently, you have to calculate the position of the element, then use dialog's position option: http://docs.jquery.com/UI/Dialog#option-position which accepts an array [x, y]. In a future version you'll be able to simply specify the element you want it positioned relative to, with the help of