Name | Type | Description |
---|---|---|
parent |
Element | 부모 요소. A parental element. |
Example:
const parent = document.getElementById("ditapContainer");
const popup = new Ditap.DitapPopup(parent);
// # 헤더
const title = document.createElement("h2");
title.classList.add("ditap-popup-title");
title.innerText = "제목";
// # 컨텐츠
const subTitle = document.createElement("p");
subTitle.classList.add("ditap-popup-subtitle");
subTitle.innerText = "소제목";
const content = document.createElement("p");
content.innerText = "다이탭 팝업에 대한 내용"
// # 푸터
const footer = document.createElement("p");
footer.innerText = "푸터"
popup.prependHeader(title);
popup.appendContent(subTitle);
popup.appendContent(content);
popup.appendFooter(footer);
popup.open();
Methods
컨텐츠 영역에 요소 추가.
Append element to content.
Append element to content.
Name | Type | Description |
---|---|---|
element |
Element |
추가할 요소. Element to add. |
푸터 영역에 요소 추가.
Append element to footer.
Append element to footer.
Name | Type | Description |
---|---|---|
element |
Element | 추가할 요소. Element to add. |
헤더 영역에 요소 추가.
Append element to header.
Name | Type | Description |
---|---|---|
element |
Element |
추가할 요소. Element to add. |
팝업 닫기.
Close popup.
Name | Type | Description |
---|---|---|
element |
Element | 매개변수가 없는 경우 wrapper 오픈. If no parameter is entered, close wrapper. |
이 객체의 모든 리소스 제거.
Remove all resources of this object.
팝업 열기.
Open popup.
Name | Type | Description |
---|---|---|
element |
Element | 매개변수가 없는 경우 wrapper 오픈. element If no parameter is entered, open wrapper. |
컨텐츠 영역 맨 앞에 요소 추가.
Prepend element to content.
Name | Type | Description |
---|---|---|
element |
Element |
추가할 요소. Element to add. |
푸터 영역 맨 앞에 요소 추가.
Prepend element to footer.
Name | Type | Description |
---|---|---|
element |
Element | 추가할 요소. Element to add. |
헤더 영역 맨 앞에 요소 추가.
Prepend element to header.
Prepend element to header.
Name | Type | Description |
---|---|---|
element |
Element |
추가할 요소. Element to add. |
컨텐츠 영역의 모든 자식 요소 제거.
Remove all children of content.
푸터 영역의 모든 자식 요소 제거.
Remove all children of footer.
헤더 영역의 모든 자식 요소 제거.
Remove all children of header.
Remove all children of header.
컨텐츠 영역의 자식 요소 제거.
Remove children of content.
Name | Type | Description |
---|---|---|
element |
Element |
제거할 요소. Element to remove. |
푸터 영역의 자식 요소 제거.
Remove children of footer.
Name | Type | Description |
---|---|---|
element |
Element | 제거할 요소. Element to remove. |
헤더 영역의 자식 요소 제거.
Remove children of header.
Name | Type | Description |
---|---|---|
element |
Element |
제거할 요소. Element to remove. |
팝업 활성화 on/off 기능.
Function on and off.
Name | Type | Description |
---|---|---|
element |
Element | 매개변수가 없는 경우 wrapper 오픈.If no parameter is entered, toggle wrapper. |