Colorbox JQuery 无法让它工作



我是第一次使用colorbox,我需要一些帮助。我把文件放在正确的文件夹里了。所以我不确定问题是什么。

下面是我的代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 <link href="colorbox.css" rel="stylesheet" type="text/css" />
        <script src="jquery.colorbox-min.js"></script>
</head>
<title>Untitled Document</title>
<body>
<!--JQuery library-->
<a href="http://jquery.com/">jQuery</a>
    <script src="jquery.js"></script>
    <script>
      var foo = "bar";
    </script>

<!--Colorbox Call-->

        <a class='gallery'     href='images/DSC_0114.JPG'>Photo_1</a>
        <a class='gallery'     href='images/money2.jpg'>Photo_2</a>
        <a class='gallery'     href='images/money2.jpg'>Photo_3</a>
        <script>
            jQuery(document).ready(function() {
            jQuery('a.gallery').colorbox();
            });;
        </script>
</body>

类"box" id "box"的内容到这里

我是初学者,所以请指出你想到的一切!div =)

在加载jquery之前加载colorbox。它需要反过来。

<script src="jquery.js"></script>
<script src="jquery.colorbox-min.js"></script>

最新更新