Sachin Parmar
A designer without a pen is a person without an idea!
Posts: 1
Registered:
Jun 1, 2011
I am trying to get my overlay working with cookies. I have looked all over the internet and nothing seems to work.
I got the overlay working on this site but need it to store cookie information so if a user arrives to the page again they won't see the pop up.
This is my code:
<script>
$(document).ready(function() {
//Code to fire popup
$("#popup").overlay({
// custom top position
top: 260,
// some mask tweaks suitable for facebox-looking dialogs
mask: {
// you might also consider a "transparent" color for the mask
color: '#000',
// load mask a little faster
loadSpeed: 200,
// very transparent
opacity: 0.75
},
// disable this for modal dialog-type of overlays
closeOnClick: false,
// load it immediately after the construction
load: true
});
});
</script>
I tried this but it didn't work:
<script>
$(document).ready(function() {
$.cookie("#popup", "false", { expires: 255 }.overlay);
if($.cookie("#popup")){
//Code To not show popup
load: false
}else{
//Code to fire popup
$("#popup").overlay({
// custom top position
top: 260,
// some mask tweaks suitable for facebox-looking dialogs
mask: {
// you might also consider a "transparent" color for the mask
color: '#000',
// load mask a little faster
loadSpeed: 200,
// very transparent
opacity: 0.75
},
// disable this for modal dialog-type of overlays
closeOnClick: false,
// load it immediately after the construction
load: true
});
}
});
</script>
Please help!!!