2016-10-15 105 views
0

我在我的网站上看到了一些javascript。jQuery Colorbox打开新页面

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

    setTimeout(openColorBox, 1000); 
} 
</script> 

lightbox.html看起来像这样。

<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> 

但是,当某人按下链接转到index.html时,它会将其加载到jQuery colorbox中。该链接是否可以在实际页面中加载而不是彩色框?彩盒就是从这里开始: http://www.jacklmoore.com/colorbox/

回答

0

尝试设置目标:

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

它的工作。非常感谢 –