Show Ad Center Page
Shoes and ad center page and only shows it one time on visitor first visit because a cookie is set.
by moojjoo
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js"></script>
<div class="shoes_ad text-center">
<button class="close">X</button>Hi, I will be the new Marketing Ad Space for the Web site</div>
<button class="delete-cookie">Delete/Reset Cookie</button>
CSS
.shoes_ad {
position:fixed;
width:30%;
height:20%;
margin:-10% auto auto -15%;
top:50%;
left:50%;
background: white;
text-align:center;
color: black;
border: 5px double blue;
z-index: 99;
}
.close {
float:right;
background-color:red;
color: white;
z-index: 99;
}
JavaScript
$('.close').click(function () {
$.cookie("noti", "closed", {
expires: 30
});
$('.shoes_ad').hide();
});
$('.delete-cookie').on('click', function () {
$.cookie("noti", "open");
$('.shoes_ad').show();
});