2012-10-02 53 views
1

我在线发现了您的jQuery Smooth Div Scroll工具。我打算捐,但我无法使其与颜色框选项工作像你有你的网站: http://www.smoothdivscroll.com/colorbox.htmljQuery Smooth Div使用Colorbox滚动

我是一个平面设计师,网页设计师寻找一个画廊选项,以显示我的工作。看起来,当我添加链接到大图像的href标签时,它会打破可滚动画廊。我在我的HTML的头部分作为链接的colorbox.css文件:

<link rel="Stylesheet" type="text/css" href="css/colorbox.css" /> 

我也有这个在文档正文:

<script type="text/javascript"> 
$(document).ready(function() { 
// Init Smooth Div Scroll 
$("#makeMeScrollable").smoothDivScroll({ 
    mousewheelScrolling: "allDirections", 
    manualContinuousScrolling: true 
}); 

// Init colorbox 
$("#makeMeScrollable a").colorbox({ speed: "500" }); 

});

难道还有另一片我失踪的难题?一个JavaScript文件?

此画廊将完美工作。任何帮助或建议你可以给予很大的赞赏!

谢谢

格里

回答

0

您需要包括jQuery库文件和脚本颜色框。

<!-- jQuery library - Please load it from Google API's --> 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js" type="text/javascript"></script> 
<!-- jQuery UI Widget and Effects Core (custom download) 
    You can make your own at: http://jqueryui.com/download --> 
<script src="js/jquery-ui-1.8.23.custom.min.js" type="text/javascript"></script> 
<!-- Latest version of jQuery Mouse Wheel by Brandon Aaron 
    You will find it here: http://brandonaaron.net/code/mousewheel/demos --> 
<script src="js/jquery.mousewheel.min.js" type="text/javascript"></script> 
<!-- jQuery Kinetic - for touch --> 
<script src="js/jquery.kinetic.js" type="text/javascript"></script> 
<!-- Smooth Div Scroll 1.3 minified--> 
<script src="js/jquery.smoothdivscroll-1.3-min.js" type="text/javascript"></script> 
<!-- If you want to look at the uncompressed version you find it at 
    js/jquery.smoothDivScroll-1.3.js --> 
<!-- Colorbox --> 
<script src="js/jquery.colorbox-min.js" type="text/javascript"></script> 
+0

谢谢,我已经加入库文件和colorbox脚本到html颜色框元素工作正常,但它似乎打破了滚动。显示的滚动画廊中只有第一张图像,当您尝试使用滚动图标时,第一张和第二张图像之间会出现闪烁。 – user1715071

+0

有可能我有一些冲突的脚本? – user1715071

+0

这里是html页面:http://www.gerardtonti.com/Scrollable%20Gallery%202/index.html – user1715071

0

Colorbox包括:

  • jquery.colorbox.js
  • colorbox.css
  • 图像加载,边界,关闭和等
+0

我已经包括了上述所有内容。问题似乎是添加颜色框功能打破了可滚动画廊。我在幻灯片中只显示一个图像,滚动功能消失。我可以在某处存在冲突的脚本吗?这里是HTML页面:http://www.gerardtonti.com/Scrollable%20Gallery%202/index.html – user1715071

+0

@ user1715071你有下一个问题:404错误的两张图片和无效的HTML标记,从你所有的图像链接第一个是关闭的,第二个是打开的,其他没有''标记。 – webdeveloper

+0

谢谢!它正在工作。非常感激。 – user1715071