tozi Posted May 7, 2014 Share Posted May 7, 2014 (edited) Hi all, i have this page http://www.petamour.cz/ In index i have popup window. But i need show this window only one. How can i change? Here is my code: <script src="http://jecas.cz/assets/magnific-popup/jquery.magnific-popup.min.js?v=0.9.8"></script> <link rel="stylesheet" href="http://jecas.cz/assets/magnific-popup/magnific-popup.css"> {if $page_name == 'index'} <script type="text/javascript"> {literal} $.magnificPopup.open({ items: [ { src: $('<div class="obalbanner"><div class="registracebanner"><a href="http://www.petamour.cz/autentifikace">REGISTRACE</a></div><div class="viceinfo"><a href="http://www.petamour.cz/content/15-vernostni-program">více informací zde »</a></div></div>'), } ] }); {/literal} </script> {/if} Edited May 7, 2014 by tozi (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted May 7, 2014 Share Posted May 7, 2014 Do you mean only once? Only for the very first time a customer visits the site? If so, it's tricky, you need to setup cookies to track if the popup has been shown already. Try out the jquery cookie plugin : http://plugins.jquery.com/cookie/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now