garethtnash
asked on
TypeError: $(this).fancybox.close is not a function. (In '$(this).fancybox.close()', '$(this).fancybox.close' is undefined)
Hello All,
I'm getting the following error in the console log -
TypeError: $(this).fancybox.close is not a function. (In '$(this).fancybox.close()' , '$(this).fancybox.close' is undefined)
When I run the following JQuery -
Any ideas?
Also I would like to briefly display a success message, before the fancy box closes?
Thank you
I'm getting the following error in the console log -
TypeError: $(this).fancybox.close is not a function. (In '$(this).fancybox.close()'
When I run the following JQuery -
$("#Alert").submit(function(e){
e.preventDefault();
$.ajax({
type: "POST",
url: "/actions/emailnotification.asp",
data:$(this).serialize(),
success:function(result){
if(result==1){
// do something success
$(this).fancybox.close();
location.reload();
}else {
// do something fail
$('#AlertError').html('<p>ErrorMessage here</p>');
$('#AlertError').fadeIn('slow');
}
}});
});
Any ideas?
Also I would like to briefly display a success message, before the fancy box closes?
Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER