Displays a modal window to confirm the deletion.
-
Include jQuery, Bootstrap, Magnific-Popup, FortAwesome and Animate.css:
<link rel="stylesheet" href="vendor/bootstrap/bootstrap.min.css"> <link rel="stylesheet" href="vendor/magnific-popup/magnific-popup.css"> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous"> <link rel="stylesheet" href="vendor/animate/animate.css"> <script src="vendor/jquery/jquery.min.js"></script> <script src="vendor/bootstrap/bootstrap.min.js"></script> <script src="vendor/magnific-popup/jquery.magnific-popup.js"></script>
-
Include plugin's code:
<script src="modal-confirm-delete.js" type="text/javascript"></script>
-
Call the plugin:
$("#element").dpjModalDelete({ route: "http://url-to-delete.com/{ID}" });