Ricky Zhang Ricky Zhang - 6 months ago 58
HTML Question

jQuery Colorbox open new page

I have some javascript in my website looking like this.

if($(window).width() <= 1024){
function openColorBox(){
$.colorbox({iframe:true, width:"80%", height:"80%", href: "assets/mobile/lightbox.html"});

setTimeout(openColorBox, 1000);

lightbox.html looks like this.

<p class="headline">Welcome to</p>
<p class="image-p"><img align="middle" class="image" src="../css/images/cmapslogo.png"></p>
<p class="text">Would you like to continue to the mobile site?</p>
<p class="button-p"><a href="index.html"><button class="button button1">Go to mobile site</button></a></p>

However, when someone presses the link to go to index.html, it loads it inside the jQuery colorbox. Can this link be loaded in the actual page and not the colorbox? Colorbox is from here:


Try setting target:

<a href="index.html" target="_top">