The error is caused by the fact that your $(this) does not refer to anything, but to the window object . It depends on how your function is called. It is best to pass the element you want to use to the deleteConfirmation() function as follows:
$("#deleteAnswer").bind("click", function() { deleteConfirmation(this); }); function deleteConfirmation(element) { jAlert('Deleted succsfully', 'Deletion Confirmation', function() { alert("The user clicked ok");
See the jsfiddle example for an example.
If you are trying to make fadeOut the notification window itself, which runs by default, as you already know.
Challe
source share