Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. $('.comment-delete').click(function(e){
  2. var commentId = $(this).attr('comment-id');
  3. var data={commentId:commentId,method:'Delete'}
  4. $.ajax(
  5. {
  6. url:'/post/comment/'+commentId,
  7. type: 'DELETE',
  8. dataType: "JSON",
  9. data: data,
  10. success: function ()
  11. {
  12. $('#comment-block-'+commentId).fadeOut("slow");
  13. Command: toastr["success"]("Comment deleted !!! ", "Success..")
  14. toastr.options = {
  15. "closeButton": false,
  16. "debug": false,
  17. "newestOnTop": false,
  18. "progressBar": false,
  19. "positionClass": "toast-bottom-right",
  20. "preventDuplicates": false,
  21. "onclick": null,
  22. "showDuration": "300",
  23. "hideDuration": "1000",
  24. "timeOut": "5000",
  25. "extendedTimeOut": "1000",
  26. "showEasing": "swing",
  27. "hideEasing": "linear",
  28. "showMethod": "fadeIn",
  29. "hideMethod": "fadeOut"
  30. }
  31. }
  32. });
  33. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement