jquery - Fancybox - Open another popup when closing a popup -
this js code
jquery('.fancybox').fancybox({ beforeload: function(current, previous) { document.getelementbyid("petition-form").reset(); jquery('#petition-form').show(); jquery('.petition-message').html(""); jquery('.petition-message').hide(); }, afterclose: function() { jquery.fancybox.open('#cancelform'); } } );
the second popup open when closing first one, second 1 closed. using fancybox 2+ . js error typeerror: this.overlay null .
i experienced same problem after upgrading latest version. quick fix not solution add short delay inside of 'afterclose'. seems free overlay in time.
'afterclose':function () { settimeout(func, 50); function func() { $.fancybox(); } },
Comments
Post a Comment