I’m using Colorbox for a project, and it Almost seems to work just fine. I just cannot get the “Iframe” version to work? What am I doing wrong? Can I not load a .html with iframe? I need it to be iframe, since it’s loading a newsletter-form.
$(document).ready(function(){
// Display a welcome message on first visit, and set a cookie that expires in 30 days:
if (document.cookie.indexOf('visited=false') === -1) {
var expires = new Date();
expires.setDate(expires.getDate()+30);
document.cookie = "visited=true; expires="+expires.toUTCString();
$.colorbox({iframe:true, href:"test.html"})
}
});
I did a wrong combination of this piece :
It must look like this:
I really don’t know why, If anyone wants to clarify it, your welcome. I only know it solved my problem.