Moved delete function to ajax and used jQuery to show operation