DitapPopup

다이탭 팝업 최상위 클래스.
Ditap popup top class.

new Ditap.DitapPopup(parent)

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

appendContent(element)

컨텐츠 영역에 요소 추가.
Append element to content.
Name Type Description
element Element 추가할 요소.
Element to add.

appendFooter(element)

푸터 영역에 요소 추가.
Append element to footer.
Name Type Description
element Element 추가할 요소.
Element to add.

appendHeader(element)

헤더 영역에 요소 추가.
Append element to header.
Name Type Description
element Element 추가할 요소.
Element to add.

close(element)

팝업 닫기.
Close popup.
Name Type Description
element Element 매개변수가 없는 경우 wrapper 오픈.
If no parameter is entered, close wrapper.

destroy()

이 객체의 모든 리소스 제거.
Remove all resources of this object.

open(element)

팝업 열기.
Open popup.
Name Type Description
element Element 매개변수가 없는 경우 wrapper 오픈.
element If no parameter is entered, open wrapper.

prependContent(element)

컨텐츠 영역 맨 앞에 요소 추가.
Prepend element to content.
Name Type Description
element Element 추가할 요소.
Element to add.

prependFooter(element)

푸터 영역 맨 앞에 요소 추가.
Prepend element to footer.
Name Type Description
element Element 추가할 요소.
Element to add.

prependHeader(element)

헤더 영역 맨 앞에 요소 추가.
Prepend element to header.
Name Type Description
element Element 추가할 요소.
Element to add.

removeAllContent()

컨텐츠 영역의 모든 자식 요소 제거.
Remove all children of content.

removeAllFooter()

푸터 영역의 모든 자식 요소 제거.
Remove all children of footer.

removeAllHeader()

헤더 영역의 모든 자식 요소 제거.
Remove all children of header.

removeContent(element)

컨텐츠 영역의 자식 요소 제거.
Remove children of content.
Name Type Description
element Element 제거할 요소.
Element to remove.

removeFooter(element)

푸터 영역의 자식 요소 제거.
Remove children of footer.
Name Type Description
element Element 제거할 요소.
Element to remove.

removeHeader(element)

헤더 영역의 자식 요소 제거.
Remove children of header.
Name Type Description
element Element 제거할 요소.
Element to remove.

toggle(element)

팝업 활성화 on/off 기능.
Function on and off.
Name Type Description
element Element 매개변수가 없는 경우 wrapper 오픈.
If no parameter is entered, toggle wrapper.