开发者

jQuery scrollable question

开发者 https://www.devze.com 2023-03-27 03:49 出处:网络
I am wondering how I can fade out a div box before scrollable starts and fade it in after the animation stops? Because for me it looks like I start scrollable and then it runs in background and looks

I am wondering how I can fade out a div box before scrollable starts and fade it in after the animation stops? Because for me it looks like I start scrollable and then it runs in background and looks for events.

Is there a function like onBeforeStart() or 开发者_运维问答similar?

Greets Max


$('#element').fadeOut('slow', function(){
//start scrollable and fadein here
})

by doing this, Scrollable starts only after fadeout is complete.

UPDATE

Using scrollable from jQuery tools, you can use the events onBeforeSeek and onSeek to fire an action before scroller starts or after it completes. You can read more about the events in the documentation at http://flowplayer.org/tools/scrollable/index.html.

To run a function after scrolling has completed, you do something like this

$("#element").scrollable({
    onSeek: function(event, i) {
         //Whatever goes here         
    }
})
0

精彩评论

暂无评论...
验证码 换一张
取 消