мой веб-сайт теперь запускает всплывающее окно javascript на домашней странице, теперь я хочу это сделать, когда пользователь нажимает на домашнюю страницу, пользователь переходит на домашнюю страницу, и отображается всплывающее окно javascript, но после нажатия кнопки "Закрыть" и при повторном нажатии пользователем на домашнюю страницу этот JavaScript не будетзапустить, этот скрипт активен только в течение одного дня.
Итак, как интегрировать куки с моим всплывающим javascript?
* это всплывающее окно работает отлично, но только оставил скрипт куки
url http://tsubamecorp.com/home/index.php?route=extras/blog/getblogcategory&blogpath=41
это мое всплывающее окно JavaScript:
<script>
var $xx = jQuery.noConflict();
$xx(document).ready(function() {
//select all the a tag with name equal to modal
$xx('a[name=modal]').click(function(e) {
//Cancel the link behavior
e.preventDefault();
//Get the A tag
var id = $xx(this).attr('href');
//Get the screen height and width
var maskHeight = $xx(document).height();
var maskWidth = $xx(window).width();
//Set heigth and width to mask to fill up the whole screen
$xx('#mask').css({'width':maskWidth,'height':maskHeight});
//transition effect
$xx('#mask').fadeIn(1000);
$xx('#mask').fadeTo("slow",0.90);
//Get the window height and width
var winH = $xx(window).height();
var winW = $xx(window).width();
//Set the popup window to center
$xx(id).css('top', winH/2-$xx(id).height()/1);
$xx(id).css('left', winW/2-$xx(id).width()/2);
//transition effect
$xx(id).fadeIn(1000);
});
//if close button is clicked
$xx('.window .close').click(function (e) {
//Cancel the link behavior
e.preventDefault();
$xx('#mask').hide();
$xx('.window').hide();
});
});
</script>
<script type="text/javascript">
window.onload = function() { $xx('a[href="#dialog1"]:eq(0)').click();
}
</script>