jQuery의 dialog

Tuhyon😀·2020년 9월 22일
0

jQuery vs javaScript

목록 보기
2/2

잘 만들어져 있는 dialog 사용기

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'),
profile
메모를 하기 위한 공간입니다.

0개의 댓글