UI Dialog - limit draggable area to a div element
I have a website that needs a dialog box opened, but i need it to open in a "div". I want the modal option, but the modal should only cover whats in the div, and not the whole page.
example:
- <div id="content">
- <div id="main_content">Blah Blah blah <a id="open_dialog">Open Dialog</div>
- <div id"second_content">Blah blah blah</div>
- </div>
- <div id="dialog_content">blah blah dialog box</div>
When i click on the "Open Dialog" box, i want the dialog box to open in the "main_content" div, and use modal, but i still want the content in the "second_content" viewable/selectable.
Is this possible?