2012-07-24 33 views
0

這是我的第一篇文章,所以希望你會對我表示同情!點擊時如何重新綁定jcarouselite?

我有jcarousellite動態綁定它的問題。

我的標記是這樣的:

<div class=outside1> 
<ul> 
<li>something here</li> 
<li>something here</li> 
<li>something here</li> 
<li>something here</li> 
</ul> 
</div> 
<div class=outside2> 
<ul> 
<li>something here</li> 
<li>something here</li> 
<li>something here</li> 
<li>something here</li> 
</ul> 
</div> 
<div class=outside3> 
<ul> 
<li>something here</li> 
<li>something here</li> 
<li>something here</li> 
<li>something here</li> 
</ul> 
</div> 

<div class="nav"> 
<a class="page1"></a> 
<a class="page2"></a> 
<a class="page3"></a> 
</div> 

<script type="text/javascript"> 
    jQuery(window).load(function() {   
       jQuery(function() { 
        jQuery("div.outside1").jCarouselLite({         
         mouseWheel: true, 
         //auto: 800, 
         speed: 1000, 
         easing: "easeOutBounce", 
         visible: 7 
        }); 
      }); 
jQuery('.page1').click(function() { 
     setTimeout(function() { 
       jQuery("div.outside1").jCarouselLite({          
         mouseWheel: true, 
         //auto: 800, 
         speed: 1000, 
         easing: "easeOutBounce", 
         visible: 7 
        });        
      }, 5000); 
    }); 
jQuery('.page2').click(function() { 
     setTimeout(function() { 
       jQuery("div.outside1").jCarouselLite({          
         mouseWheel: true, 
         //auto: 800, 
         speed: 1000, 
         easing: "easeOutBounce", 
         visible: 7 
        });        
      }, 5000); 
    }); 
jQuery('.page3').click(function() { 
     setTimeout(function() { 
       jQuery("div.outside1").jCarouselLite({          
         mouseWheel: true, 
         //auto: 800, 
         speed: 1000, 
         easing: "easeOutBounce", 
         visible: 7 
        });        
      }, 5000); 
    }); 
    }); 
    </script> 

我的問題是,當我在第1頁,第二頁,第三頁單擊要更改的div元素會結合jcarousellite,但它不工作。 我希望你能幫助我。謝謝!

我忘了說,這是我使用的插件:http://www.gmarwaha.com/jquery/jcarousellite/

回答

0

該插件並不適用於多個例如一個一個頁面進行。但你可以嘗試隱藏其他這樣的: http://jsfiddle.net/kannix/B2PfG/1/

+0

非常感謝你的朋友!抱歉,因爲我遲到了,謝謝你。希望你對我有同情心! – vietvoquoc 2012-07-30 13:48:25

相關問題