@extends('layouts.admin')
@section('title', 'Dashboard')
@section('css')
@endsection
@section('breadcrumb', 'Dashboard')
@section('content')
@endsection
@section('js')
$(function() {
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
//
$(document).on('click', '#rmv', function(e) {
e.preventDefault(); // does not go through with the link.
x = confirm("Are You sure ?");
if (x == false) {
return false;
}
aa = $(event.target).closest("li");
$.ajax({
url: this.href,
type: 'delete',
success: function(data) {
$(aa).remove();
},
error: function(data) {
//alert("Error while deleting.");
// console.log(data);
}
});
});
//
//
});
@endsection