2011-05-23 101 views
0

我的網站:http://windowsphonedaily.blogspot.com/EasySlider和Lightbox衝突?

我第一次注意到當EasySlider 1.7每當我嘗試添加任何JavaScript函數(如「continuous:true」)時出現問題。這兩個導航按鈕(prevBtn和nextBtn)會在完成時消失,所以我必須撤消所做的任何更改。然後我意識到,我用於我的文章圖像的簡單的燈箱不起作用,只會作爲圖片的正常直接鏈接。

所以我想這個問題很可能是在我的網站的Javascript。我通常會在教程和指南中遵循示例,所以我真的不知道如何實現多個腳本,而不會發生衝突。

我對JavaScript一般都不太瞭解,所以我給你一個提醒,我是一個noob!

以下是燈箱和EasySlider的當前設置。我敢肯定,這可能是我犯的一個愚蠢的錯誤,但任何幫助都會受到懲罰!謝謝!

<!--Light Box Code Starts Bloggerplugins.ORG--> 
    <style> 
    #lightbox{ position: absolute; left: 0; width: 100%; z-index: 100; text-align: center; line-height: 0;} 
    #lightbox img{ width: auto; height: auto;} 
    #lightbox a img{ border: none; } 

    #outerImageContainer{ position: relative; background-color: #fff; width: 250px; height: 250px; margin: 0 auto; } 
    #imageContainer{ padding: 10px; } 

    #loading{ position: absolute; top: 40%; left: 0%; height: 25%; width: 100%; text-align: center; line-height: 0; } 
    #hoverNav{ position: absolute; top: 0; left: 0; height: 100%; width: 100%; z-index: 10; } 
    #imageContainer&gt;#hoverNav{ left: 0;} 
    #hoverNav a{ outline: none;} 

    #prevLink, #nextLink{ width: 49%; height: 100%; background-image: url(data:image/gif;base64,AAAA); /* Trick IE into showing hover */ display: block; } 
    #prevLink { left: 0; float: left;} 
    #nextLink { right: 0; float: right;} 
    #prevLink:hover, #prevLink:visited:hover { background: url(http://lh5.ggpht.com/_u4gySN2ZgqE/SnWk89-4azI/AAAAAAAAAj8/hM0MqnVouCQ/prevlabel%5B3%5D.gif) left 15% no-repeat; } 
    #nextLink:hover, #nextLink:visited:hover { background: url(http://lh6.ggpht.com/_u4gySN2ZgqE/SnWk9-mNiQI/AAAAAAAAAkA/Zg1jXV9xnQM/nextlabel%5B6%5D.gif) right 15% no-repeat; } 

    #imageDataContainer{ font: 10px Verdana, Helvetica, sans-serif; background-color: #fff; margin: 0 auto; line-height: 1.4em; overflow: auto; width: 100% ; } 

    #imageData{ padding:0 10px; color: #666; } 
    #imageData #imageDetails{ width: 70%; float: left; text-align: left; } 
    #imageData #caption{ font-weight: bold; } 
    #imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em; }   
    #imageData #bottomNavClose{ width: 66px; float: right; padding-bottom: 0.7em; outline: none;}  

    #overlay{ position: absolute; top: 0; left: 0; z-index: 90; width: 100%; height: 500px; background-color: #000; } 
round-color: #000; } 
lute; top: 0; left: 0; z-index: 90; width: 100%; height: 500px; background-color: #000; } 
round-color: #000; } 
    </style> 
    <script src='http://ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js' type='text/javascript'/> 
    <script src='http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.3/scriptaculous.js' type='text/javascript'/> 
    <script src='http://blogergadgets.googlecode.com/files/lightbox.js' type='text/javascript'/> 
<!--Light Box Code Ends Bloggerplugins.ORG--> 

<script src='https://sites.google.com/site/shawnhasinger/home/files/jquery.js' type='text/javascript'/> 

<script src='https://sites.google.com/site/shawnhasinger/home/files/easySlider1.7.js' type='text/javascript'/> 

<script type='text/javascript'> 
$(document).ready(function(){ 
    $(&quot;#slider&quot;).easySlider(); 
}); 
</script> 

更新:我試圖修復detailed at this website和它固定的燈箱,但它打破了EasySlider。

+0

我試着解決了這個網站上的問題。之後燈箱運行良好,但easyslider壞了。 http://designreviver.com/answers/58145/ – Saad 2011-05-25 22:04:34

回答

1

我不是Javascript的專家,但我終於在經過多次試驗和錯誤之後才得以工作。首先,對於我使用Slimbox2的燈箱。然後我確信jQuery腳本在Slimbox2腳本之前。我把EasySlider腳本放在最後。