bahramzade

Untitled

Dec 27th, 2020
390
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $('body').on('click', '.item', function() {
  2.     var id = $(this).attr('data-value');
  3.     if ($(this).data('value')) {
  4.         $.ajax({
  5.             type: 'POST',
  6.             url: URL + '/admin/ajax/delete/coursestudent',
  7.             data: 'id=' + id,
  8.             success: function(resp) {
  9.             $('.selectize-input div[data-value="' + id + '"]').remove()
  10.             Snackbar.show({ text: " " + id + " User silindi", customClass: 'bg-success' });
  11.             }                        
  12.              });      
  13.     } else {
  14.          alert(" "+ id + " not delete");       
  15.     }
  16. });
RAW Paste Data