Setup Timer on jQuery PopUp -
i have following jquery code newsletter popup , want set delay on pop-up after minute:
function beginnewsletterform() { jquery.fancybox({ 'padding': '0px', 'autoscale': true, 'transitionin': 'fade', 'transitionout': 'fade', 'type': 'inline', 'href': '#newsletter_popup', 'oncomplete': function() { $.cookie('newsletter_popup', 'shown'); }, 'tpl': { closebtn: '<a title="close" class="fancybox-item fancybox-close fancybox-newsletter-close" href="javascript:;"></a>' }, 'helpers': { overlay : { locked : false } } }); jquery('#newsletter_popup').trigger('click'); } </script>
i thought add following after transitionout:
'settimeout': '5000'
and adjust time needed (i believe above 5 seconds), doesn't work. ideas?
try settimeout(function(){jquery('#newsletter_popup').trigger('click');},5000);
Comments
Post a Comment