2

我正在使用 jQuery Colorbox 到页面(index.html )从位于同一目录的单独页面(content.html )加载 DIV 内容。

适用于最新的 Firefox、Chrome 和 IE10 ,但不适用于 IE8

你能帮我弄清楚代码有什么问题或者为什么颜色框的内容根本没有在 IE8 上加载吗?

我尝试使用内联,但它似乎只有在 DIV 位于同一页面内并且不适用于单独页面上的 DIV 时才有效。

谢谢!

索引.html

$(document).ready(function(){
$(".link").colorbox({href: function(){ return $(this).attr('href') + " #showbox";}
});

<a href="content.html#showbox" class="link">Show the box</a>

内容.html

<div id="showbox"> <p>Voila!</p> </div>

4

0 回答 0