Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).on('click', '.borrar', function (event) {
- swal({
- title: "¿Estás seguro?",
- text: "Estás por borrar un proyecto, este no se podrá recuperar más adelante.",
- type: "warning",
- showCancelButton: true,
- cancelButtonText: "Cancelar",
- confirmButtonColor: "#DD6B55",
- confirmButtonText: "Continuar",
- closeOnConfirm: false
- },
- function (isConfirm) {
- if(isConfirm){
- swal({
- title: "Eliminado",
- text: "Eliminaste el registro del proyecto.",
- type: "success"
- }, function(){
- event.preventDefault();
- $(this).closest('tr').remove();
- });
- }
- else{
- swal("No se ha eliminado.","El registro NO ha sido eliminado.","error");
- delay(2000);
- }
- });
Add Comment
Please, Sign In to add comment