我創建了一個編輯simple.carousel.js停止旋轉木馬時,但我有一個問題時重新啓動它,當mouseleave。我加入simple.carousel.js的代碼是:mouseenter mouseleave jquery懸停並重新啓動與simple.carousel.js問題
// hover stop
if(config.auto!=true)
$(this).mouseenter(function() {
config.auto=false;
}).mouseleave(function() {
config.auto=true;
});
你可以在這裏與我的另外從上面看到完整的代碼/例如:http://jsfiddle.net/6r6sC/2/
是什麼毛病我的鼠標離開功能?
不知道這是否會幫助,但我也試着以下但不工作,要麼:
// hover stop
if(config.auto!=true)
$(this).mouseenter(function() {
config.auto=false;
}).mouseleave(function() {
setTimeout(function() {
slide('next');
}, config.auto);
});
任何幫助將不勝感激,因爲這有我難住了。
有了第一個代碼,加載PAG汽車時只發揮了作用。 – InfiniDaZa