$(myDiv).dialog({
  dragStop: function(ev, ui){
    var top = ui.position.top;
    var left = ui.position.left;
    var win = $(window);
    if (top < 0 || left < 0 || top + 20 > win.height() || left + 40 >
win.width()) {
      $(this).dialog("position",[200,10]);
    }
  }
})

Doc has been updated: http://docs.jquery.com/UI/Dialog/dialog

Olivier.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to