Adjust modal position before opening it.
Bind close event for dyanically added elements.