exhtml
12/2/2016 - 6:02 AM

Bootbox Alert Confirm Message with bootstrap modal http://bootboxjs.com/

Bootbox Alert Confirm Message with bootstrap modal http://bootboxjs.com/

<a class="sfe-btn-secondary js-confirm-delete" 
   href="{!! route('contents.delete', [$content->id]) !!}" 
   data-confirm-message="Are you sure wants to delete this Content??">
     Eliminar
</a>

<script>

$(document).on("click", ".js-confirm-delete", function(e) {

  var newhref = $(this).attr("href"),
      message = $(this).attr("data-confirm-message")
  e.preventDefault();
  
  bootbox.confirm(message, function(result) {
    if(result) {
      document.location.href = newhref;
    }
  });
});
</script>