I am trying to add a script to my website
I do not know if I added it right the code works here Display Content / Advert / Popup Once Per Session I am trying to add it to my site. thxCode:<script type="text/javascript"> jQuery(document).ready(function($) { if (sessionStorage.getItem('advertOnce') !== 'true') { $('body').append('<div id="advert-once"><a href="http://www.html5andbeyond.com/session-storage-display-popup-advert/" target="_blank"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/130527/h5ab-logo.png" border="0" alt="banner" /></a><div class="advert-button"></div></div>') sessionStorage.setItem('advertOnce', 'true'); } $('#advert-once .advert-button').on('click', function() { $('#advert-once').hide(); }); $('#reset-session').on('click', function() { sessionStorage.setItem('advertOnce', ''); }); }); </script>




Reply With Quote

