jQuery에 기본으로 탑재되어있는 dialog는 정말 사용이 용이하다.
dialog는 팝업인데, 크기 조절이 가능하며, 움직이는 것도 가능하다.
dialog = $('#id').dialog({
autoOpen: false,
height: 500,
width: 750,
modal: true,
buttons: {
Cancel: function() {
dialog.dialog('close');
}
}
});
위와 같이 실행하면 body태그 끝에 붙고,
필요에 따라 특정 태그 안에 만들고 싶을 때 추가로 옵션을 설정하면 된다.
appendTo: document.querySelector('#id'),