Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. script with the delete function
  2. $(document).on('click', '.task-delete', (e) => {
  3. console.log('FetchTaskCheckDelete1!');
  4. if(confirm('Are you sure you want to delete it?')) {
  5. const element = $(this)[0].activeElement.parentElement;
  6. var element2 = $(this).attr("value");
  7. const id = $(element).attr("id");
  8. console.log('FetchTaskCheckDelete2!');
  9. console.log(element);
  10. console.log(element2);
  11. console.log(id);
  12. $.post('task-delete.php', {id}, (response) => {
  13. fetchTasks();
  14. });
  15. }
  16. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement