可能重複:
Can I declare logic on jQuery for the start and end of a scrolling event?只有當我開始滾動時纔可能調用函數嗎?
嘗試這樣:
$(window).scroll(function() {
console.log("ciao");
});
但功能滾動過程中調用。我只想在開始滾動時打印「ciao」。不是。那麼,阻止滾動後,當我重新啓動,再次打印「ciao」,等等。
僅當我開始滾動時纔可能調用函數嗎?
http://stackoverflow.com/questions/4096429/can-i-declare-logic-on-jquery-for-the-start-and末端 - - 一個滾動事件的 – Dev 2012-04-13 09:21:40