2012-10-02 56 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