I have a site where a user must login and once that is done they are directed to a new page and a pop up box appears. I have no problem displaying the popup box however if y
While this thread may be ancient, I wanted to give an answer that OP could have used. By using cookies, you can set the page to only show once. Since most browsers support cookies, this is more reliable than using the internal storage engine that current browsers possess.
$(document).ready(function(){
// test for cookie here
if ($.cookie('test_status') != '1') {
//show popup here
window.open('YOUR POPUP URL HERE','windowtest','toolbar=0,status=0,width=500,height=500');
// set cookie here if not previous set
var date = new Date();
var minutes = 30;
date.setTime(date.getTime() + (minutes * 60 * 1000));
$.cookie('test_status', '1', {expires: date});
}
});
To test this, be sure to clear your cookies between every refresh.
You can use this for one time popup.
$(window).load(function(){
$('.popUp').show();
$('.close').click(function(){
$('.popUp').slideUp();
});
setTimeout('$(".popUp").fadeOut()', 10000);
});
you can use localstorage
to do that:
if (localStorage.getItem("iswrpdivloaded") === null) {
$('#back-wrapper').fadeIn(1000,function(){
$('#popup-image-back').fadeIn(1000);
});
localStorage.setItem('iswrpdivloaded', 1);
}