screen_rotation
Copied to Clipboard
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Bootstrap 5 Modal Example</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/css/bootstrap.min.css" rel="stylesheet"> </head> <body> <h3>Bootstrap Toast Message | Notification</h3> <button id="toast-btn" class="btn btn-primary">Toast Message</button> <div class="toast-container position-fixed bottom-0 end-0 p-3"> <div id="copied-toast" class="toast bg-dark text-white" role="alert" aria-live="assertive" aria-atomic="true" data-bs-delay="5000"> <div class="toast-body"> <!-- Dynamic content will be inserted here --> </div> </div> </div> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/js/bootstrap.bundle.min.js"></script> <script> $(document).ready(function () { $('#toast-btn').click(function () { var dynamicContent = 'This is a dynamically generated message!'; $('#copied-toast .toast-body').text(dynamicContent); var toast = new bootstrap.Toast($('#copied-toast')[0]); toast.show(); }); }); </script> </body> </html>