I am again.
I managed to set cookies for my FancyBox using this bit of code from another question in Stack Overflow:
$(document).ready(function(){
var check_cookie = $.cookie('the_cookie');
if(check_cookie == null){
$.fancybox('<h2>Some content</h2>', {
'onComplete' : function() {
$.cookie('the_cookie', 'the_value');
}
});
}
});
This may be a dumb question, but now my problem is that I lost formatting for my FancyBox. Can someone please tell me where should I put this code so that I can have my cookies and formatting?
{
'autoDimensions' : false,
'width' : 450,
'height' : 190,
'transitionIn' : 'none',
'transitionOut' : 'none'
}
source
share