有一个的fancybox Ajax调用的jQuery的fancybox关闭错误
$.ajax({
type: 'POST',
url: 'sendmesse.php',
data: $("#messform").serialize(),
success: function(data) {
if(data == "true") {
$("#messform").fadeOut("fast", function(){
$(this).before("<strong>Success! Your feedback has been sent, thanks :)</strong>");
setTimeout($.fancybox.close(), 1000);
// $('.fancybox').close();
// $.fancybox.close();
});
}
}
});
所有在截止正常工作APPART下,尝试了各种变化,而不sucess。 以上超时给我 Error: useless setTimeout call (missing quotes around argument?)
,所以我都尝试 setTimeout('$.fancybox.close()', 1000);
和 setTimeout("$.fancybox.close()", 1000);
,而我得到以下错误TypeError: $ is undefined
...帮助!
OK完美的感谢 – 2012-08-07 09:07:05