make the element dragable,if dialog,change =.parent()