I have a standard jquery-ui dialog created with
$("#element").dialog(); and I'm trying to find the best way of containing it within the bounds of another element.
Here's a fiddle of the situation: http://jsfiddle.net/Z4xAA/ - I'm trying to contain #myDialog within the bounds of #dialogContainer
He intentado hacer este to move the dialog.parent to the container element - but to no avail.
Any idea how I'd go about this?
Edit: I was playing around with the fiddle, and found that if I moved the dialog into the container element myself via the webkit debugger it behaved as desired. Now it's just a matter of doing that programatically.
preguntado el 28 de agosto de 12 a las 13:08
Using .append() moves the element properly. Doing it on the .parent() of the dialog to the container gives the desired result.
Violín actualizado en http://jsfiddle.net/Z4xAA/7/
All that needs doing after that is repositioning the dialog if needed to stop it being above the top of the element.