i am using this plugin and now i tried add some delay time before close a div, but i get this error
$.fancybox.delay is not a function
for this code:
$("#msgbox1").fadeTo(200, 0.1, function() {
$(this).html('Foi enviado um email').removeClass('messageboxerror1').addClass('messageboxok1').fadeTo(900, 1);
$.fancybox.delay(8开发者_JAVA百科00).close();
});
what is the problem?
thanks
That's because $.fancybox.delay
is not a function. See the Fancybox API for a list of valid methods.
Try using a setTimeout
, e.g.:
setTimeout(function() {
$.fancybox.close();
}, 800);
精彩评论