Press "Enter" to skip to content

Create Bootstrap 5 Modal Box using JavaScript | Dynamic BS5 ModalPopup

Create Dynamic BS5 Modal Box using JavaScript with custom title, description, and button labels, and call your custom YES button.

How to make use of it:

1. Download and load the principle script modal-with-custom-action.js into your Bootstrap 5 undertaking.

// Bootstrap 5 Files
<link rel="stylesheet" href="/path/to/cdn/bootstrap.min.css" />
<script src="/path/to/cdn/modal-with-custom-action.js"></script>

// Custom Modal JavaScript
<script src="modal-with-custom-action.js"></script>

2. Display a Bootstrap 5 modal window on the display screen. Possible parameters:

// showModal(title, description, yesBtnLabel = 'Yes', noBtnLabel = 'Cancel', callback)
showModal('File Deletion', 'Do you want to delete this file?', "Yes", "No", () => {
  console.log('File deleted successfully');

Create Bootstrap 5 Modals With Custom Actions, Dynamic BS5 Modal Box Plugin/Github


See Demo And Download

Official Website(zFunx): Click Here

This superior jQuery/javascript plugin is developed by zFunx. For extra Advanced Usages, please go to the official website.

Be First to Comment

    Leave a Reply

    Your email address will not be published.