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  - oParent.scrollTop;
    left += oParent.offsetLeft - oParent.scrollLeft;
    oParent = oParent.offsetParent;
}
top += i.height(); // want it below the i-object
left -= 150; // default width is 300, so approx center
var d=\$("#$theid").dialog({ bgiframe: true});
d.dialog('option', 'position', [left, top ] ); // reposistion in case
of scroll
d.dialog("open");


On May 2, 8:32 am, led <l.r....@sapo.pt> wrote:
> How can i set the position of dialog relatively to element(  as  a
> tooltip)?

On May 2, 8:32 am, led <l.r....@sapo.pt> wrote:
> How can i set the position of dialog relatively to element(  as  a
> tooltip)?

Reply via email to