@aniya.jaskolski
To use a Bootstrap popup in CodeIgniter, follow these steps:
1 2 |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> |
1 2 3 |
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal"> Open Popup </button> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<!-- Popup Modal --> <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">Popup Title</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> Popup Content Goes Here </div> </div> </div> </div> |
That's it! You have successfully implemented a Bootstrap popup in your CodeIgniter project. You can customize the popup styling and content as needed to suit your project requirements.