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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -