Created
February 11, 2015 20:10
-
-
Save austra/868e06718c00ffee70d2 to your computer and use it in GitHub Desktop.
confimation before ajax request
This file contains 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
$('.removeItem').click(function (event) { | |
if (confirm('Are you sure you want to delete this?')) { | |
$.ajax({ | |
url: 'myUrl', | |
type: "POST", | |
data: { | |
// data stuff here | |
}, | |
success: function () { | |
// does some stuff here... | |
} | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment