Examples
<button class="e-btn e-btn-primary" type="button" id="opener">
Open Popup
</button>
<div id="content">
<p>Content of the custom popup.</p>
<div class="e-popup-panel__footer">
<div class="e-popup-panel__actions">
<button class="e-btn e-btn-primary e-popup-panel__action" type="button">
Close
</button>
</div>
</div>
</div>
document.getElementById('content').querySelector('button').addEventListener('click', () => popup.close());
document.getElementById('opener').addEventListener('click', () => popup.toggle());
const popup = window.e.utils.createPopup(
document.getElementById('opener'),
document.getElementById('content'),
{
closeOnOutsideClick: false,
closeOnOEscPress: false,
placement: 'right',
elementToFocusOnOpen: document.getElementById('content').querySelector('button')
}
);
'info', 'warning', 'success', 'error'
<button class="e-btn e-btn-primary" type="button" id="opener">
Open Popup
</button>
<div id="content">
<p>Content of the custom popup.</p>
<div class="e-popup-panel__footer">
<div class="e-popup-panel__actions">
<button class="e-btn e-btn-primary e-popup-panel__action" type="button">
Close
</button>
</div>
</div>
</div>
document.getElementById('content').querySelector('button').addEventListener('click', () => popup.close());
document.getElementById('opener').addEventListener('click', () => popup.toggle());
const popup = window.e.utils.createPopup(
document.getElementById('opener'),
document.getElementById('content'),
{
closeOnOutsideClick: false,
closeOnOEscPress: false,
placement: 'right',
elementToFocusOnOpen: document.getElementById('content').querySelector('button'),
type: 'success'
}
);