GIJGO
Run Example
Close Window
<!DOCTYPE html> <html> <head> <title>Draggable Bootstrap 5 Modal</title> <meta charset="utf-8" /> <script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script> <script src="https://unpkg.com/gijgo@1.9.14/js/gijgo.min.js" type="text/javascript"></script> <link href="https://unpkg.com/gijgo@1.9.14/css/gijgo.min.css" rel="stylesheet" type="text/css" /> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"> </head> <body> <ul> <li>Click on the dialog header and move the mouse in order to drag the dialog.</li> <!--<li>Click on the dialog borders and move the mouse in order to resize the dialog.</li>--> </ul> <button class="btn btn-primary" onclick="dialog.open()">Reopen</button> <div id="dialog"> <div data-role="header" class="modal-header"> <h5 data-role="title" class="modal-title">Draggable Bootstrap 5 Modal</h5> <button type="button" data-role="close" title="Close" data-bs-dismiss="modal" aria-label="Close" class="btn-close"></button> </div> <div data-role="body"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. </div> <div data-role="footer"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button> <button type="button" class="btn btn-primary" onclick="dialog.close()">OK</button> </div> </div> <script type="text/javascript"> var dialog; $(document).ready(function () { dialog = $("#dialog").dialog({ uiLibrary: 'bootstrap5', minWidth: 200, maxWidth: 600, minHeight: 300, maxHeight: 450, width: 450, height: 350, modal: true }); }); </script> </body> </html>