Reputation: 4047
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(800).close();
});
what is the problem?
thanks
Upvotes: 0
Views: 879
Reputation: 83279
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);
Upvotes: 2