I want to show popup window once at each language site ( which my site is at double language ) . So when the user open each of them the message shows only one time .. I have used session to do that , but it's only showing one time for both of the language , and i have used this code
<script>// Created for an Articles on:
// https://www.html5andbeyond.com/session-storage-display-popup-advert/
jQuery(document).ready(function($){
if (sessionStorage.getItem('advertOnce') !== 'true') {
$('body').append('<div id="advert-once"> <div id="boxes"><div style="top: 199.5px; left: 551.5px; display: none;" id="dialog" class="window"><h1 class="dialog">@lang("pagination.poptitle")</h1><h2 class="dialog">@lang("pagination.popup")</h2><button id="clos" class="close " class=" ">@lang("pagination.popbutton") </button></div></div><div style="width: 1478px; height: 1000px; display: none; opacity: 0.8;" id="mask"></div><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','');
});
});
//# sourceURL=pen.js
</script>
So the question is how to make it shows at each home page language only one time ? It's now show only one time for both of them .
via Dina Shaldoum