Created
June 3, 2009 15:19
-
-
Save garyharan/123032 to your computer and use it in GitHub Desktop.
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
$(document).ready(function () { | |
$("a.remove").click(function() { | |
$.post(this.href, {_method: "delete"}); | |
$(this).parent().remove(); | |
return false; | |
}); | |
}); |
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
$(document).ready(function () { | |
$("a.remove").click(function() { | |
$.post(this.href, { | |
_method: "delete", | |
beforeSend: function(){ | |
$(this).parent.remove(); | |
} | |
}); | |
// $(this).parent().remove(); | |
return false; | |
}); | |
}); |
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
$(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; | |
}); | |
}); |
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
$(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