Created
November 6, 2018 18:01
-
-
Save Msx1/92c9872039561f7d9bf3753ca9af25b6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ready(function () { | |
| $('.deleteUser').on('click', deleteUser) | |
| }); | |
| function deleteUser() { | |
| if (confirm('Are You Sure?')) { | |
| $.ajax({ | |
| type: 'DELETE', | |
| url: '/users/delete/' + $(this).data('id') | |
| }).always(function (response) { | |
| window.location = '/'; | |
| }); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment