Implement dialog on div creation