2014-04-02 29 views
0

我正在使用此腳本將響應式幻燈片添加到一個小網站。我還沒有找到完美的幻燈片劇本,我懷疑它存在。我已經從貓頭鷹滑塊,通量滑塊到jquery基本滑塊,現在我已經到達responsiveslides.js(responsiveslides.com/https://github.com/viljamis/ResponsiveSlides.jsresponsiveslides.js - 自動不工作

我的問題是,我無法讓自動設置工作。這是我的代碼來觸發插件:

$(".rslides_home").responsiveSlides({ 
    'pause':true 
}); 

此設置應該停止動畫,我只希望它滑動每次點擊。但它沒有做一件事。儘管如此,更改默認設置還是可以的。

有沒有人有想法如何解決這個問題?

回答

0

您正在使用錯誤的選項。 「暫停」在滑塊中具有不同的含義。 自動選項定義滑塊是否自動運行。

$(".rslides_home").responsiveSlides({ 
    auto: false 
    }); 

這裏是滑塊的定義選項。正如您所看到的那樣,當您希望滑塊在懸停時停止時使用「暫停」選項。

$(".rslides").responsiveSlides({ 
    auto: true,    // Boolean: Animate automatically, true or false 
    speed: 500,   // Integer: Speed of the transition, in milliseconds 
    timeout: 4000,   // Integer: Time between slide transitions, in milliseconds 
    pager: false,   // Boolean: Show pager, true or false 
    nav: false,    // Boolean: Show navigation, true or false 
    random: false,   // Boolean: Randomize the order of the slides, true or false 
    pause: false,   // Boolean: Pause on hover, true or false 
    pauseControls: true, // Boolean: Pause when hovering controls, true or false 
    prevText: "Previous", // String: Text for the "previous" button 
    nextText: "Next",  // String: Text for the "next" button 
    maxwidth: "",   // Integer: Max-width of the slideshow, in pixels 
    navContainer: "",  // Selector: Where controls should be appended to, default is after the 'ul' 
    manualControls: "",  // Selector: Declare custom pager navigation 
    namespace: "rslides", // String: Change the default namespace used 
    before: function(){}, // Function: Before callback 
    after: function(){}  // Function: After callback 
}); 

這些選項從http://responsiveslides.com/

+0

你能解釋這一點考慮? – Stefan