Skip to content

Instantly share code, notes, and snippets.

@garyharan
Created June 3, 2009 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garyharan/123032 to your computer and use it in GitHub Desktop.
Save garyharan/123032 to your computer and use it in GitHub Desktop.
$(document).ready(function () {
$("a.remove").click(function() {
$.post(this.href, {_method: "delete"});
$(this).parent().remove();
return false;
});
});
$(document).ready(function () {
$("a.remove").click(function() {
$.post(this.href, {
_method: "delete",
beforeSend: function(){
$(this).parent.remove();
}
});
// $(this).parent().remove();
return false;
});
});
$(document).ready(function () {
$("a.remove").click(function() {
var toto = this;
$.post(this.href, {
_method: "delete",
beforeSend: function(){
$(toto).parent.remove();
}
});
// $(this).parent().remove();
return false;
});
});
$(document).ready(function () {
$("a.remove").click(function() {
var self = this;
$.post(this.href, {
_method: "delete",
beforeSend: function(){
$(self).parent().css({"opacity": 0.5});
},
success: function(){
$(self).parent().remove();
}
});
return false;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment