MCPcopy Create free account
hub / github.com/azat-co/practicalnode / remove

Function remove

code/ch10/grunt-example/source/admin.js:16–27  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

14};
15
16var remove = function(event) {
17 var $tr = findTr(event);
18 var id = $tr.data('id');
19 $.ajax({
20 url: '/api/articles/' + id,
21 type: 'DELETE',
22 success: function(data, status, xhr) {
23 $('.alert').addClass('hidden');
24 $tr.remove();
25 }
26 });
27};
28
29var update = function(event) {
30 var $tr = findTr(event);

Callers

nothing calls this directly

Calls 1

findTrFunction · 0.70

Tested by

no test coverage detected