Promo Space close after a few seconds

Hello, congratulate the module works perfectly , but wanted advice if you may be close after a few seconds.
Thanks for listening , greetings .
9 years 5 months ago #1 by Joao

Please Log in or Create an account to join the conversation.

  • Posted by TemplatePlazza (5310) Offline
HI, open the file ../modules/mod_tppromospace/assets/script.js, change this code :
jQuery('#button-close').live('click', function(){
		jQuery('#tppromospace' ).animate( { opacity: '0' }, { queue: false, duration: 750 });
		jQuery('#tppromospace').delay(500).slideUp(400); 
		jQuery.cookie('tppromospace', '1');
		jQuery('#button-close').hide();
		jQuery('#button-show').show();
	});

to
setTimeout( function(){
		jQuery('#tppromospace' ).animate( { opacity: '0' }, { queue: false, duration: 750 });
		jQuery('#tppromospace').delay(500).slideUp(400);
		jQuery.cookie('tppromospace', '1');
		jQuery('#button-close').hide();
		jQuery('#button-show').show();
}  , 2000 );
9 years 5 months ago #2 by TemplatePlazza

Please Log in or Create an account to join the conversation.

Thanks , works almost perfect, has a bug that does not close the window if you open it , any ideas ?
9 years 5 months ago #3 by Joao

Please Log in or Create an account to join the conversation.

  • Posted by TemplatePlazza (5310) Offline
Ah, ok. Then re-add the code after the new code, so the code will look like this :
setTimeout( function(){
        jQuery('#tppromospace' ).animate( { opacity: '0' }, { queue: false, duration: 750 });
        jQuery('#tppromospace').delay(500).slideUp(400);
        jQuery.cookie('tppromospace', '1');
        jQuery('#button-close').hide();
        jQuery('#button-show').show();
}  , 2000 );
 
jQuery('#button-close').live('click', function(){
        jQuery('#tppromospace' ).animate( { opacity: '0' }, { queue: false, duration: 750 });
        jQuery('#tppromospace').delay(500).slideUp(400); 
        jQuery.cookie('tppromospace', '1');
        jQuery('#button-close').hide();
        jQuery('#button-show').show();
    });
9 years 5 months ago #4 by TemplatePlazza

Please Log in or Create an account to join the conversation.

Ayoma Hello, you solved your problem? I tried but I can not obtain the claimed effect. If you have solved, could you pass the list of files script.js changed?
Thank you
9 years 4 months ago #5 by mariano

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum