Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script with the delete function
- $(document).on('click', '.task-delete', (e) => {
- console.log('FetchTaskCheckDelete1!');
- if(confirm('Are you sure you want to delete it?')) {
- const element = $(this)[0].activeElement.parentElement;
- var element2 = $(this).attr("value");
- const id = $(element).attr("id");
- console.log('FetchTaskCheckDelete2!');
- console.log(element);
- console.log(element2);
- console.log(id);
- $.post('task-delete.php', {id}, (response) => {
- fetchTasks();
- });
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement