📜  popin localstorage once - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:19.549000             🧑  作者: Mango

代码示例1
$j(document).ready(function() {
    if(localStorage.getItem('popState') != 'shown'){
        $j("#popup").delay(2000).fadeIn();
        localStorage.setItem('popState','shown')
    }

    $j('#popup-close, #popup').click(function(e) // You are clicking the close button
    {
        $j('#popup').fadeOut(); // Now the pop up is hiden.
    });
});