You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I did it this way, not sure the best way, but it worked for me
In the onepagescroll setup script:
var prevIndex = 1;
jQuery(".main").onepage_scroll({
...
afterMove: function(index) {
...
prevIndex = parseInt(jQuery('body').attr('class').substr(jQuery('body').attr('class').indexOf('viewing-page-')+13)); //at the very end of afterMove method
},
Then I check whether prevIndex is less or more than index variable where I need it and it works for me.
How i can to detect scroll direction (up or down) in beforeMove callback function?
The text was updated successfully, but these errors were encountered: