Ricky Zhang Ricky Zhang - 1 year ago 97
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:

Answer Source

Try setting target:

<a href="index.html" target="_top">
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download