Advertisement
Guest User

Untitled

a guest
Aug 20th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. console.log
  2. ----------------------
  3. <input value="1" type="checkbox">
  4. TypeError: task.val is not a function
  5.  
  6. var tasks = $('input:checked');
  7.  
  8. function delete_tasks(index) {
  9. var task = tasks[index];
  10.  
  11. console.log(task)
  12.  
  13. console.log(task.val());
  14.  
  15. ajax('http://localhost/projects/neo/task/delete/' + task.val())
  16. .done(function() {
  17. delete_tasks(++index);
  18. });
  19. }
  20.  
  21. delete_tasks(0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement