Skip to content
This repository has been archived by the owner on Jan 24, 2018. It is now read-only.

keyframe Not perform #839

Open
zhangjiadexiaohai opened this issue Jan 11, 2017 · 0 comments
Open

keyframe Not perform #839

zhangjiadexiaohai opened this issue Jan 11, 2017 · 0 comments

Comments

@zhangjiadexiaohai
Copy link

function initSkrollr() {
mySkrollr = skrollr.init({
smoothScrolling:false,
mobileDeceleration: 0.002,
keyframe:function(element, name, direction){
var nameDir = name + "." + direction;
if (element == $page2[0]) {
if (nameDir == "dataBottomTop.down" || nameDir == "dataTopBottom.up") {
$pageBGs.eq(0).addClass('active');
} else if (nameDir == "dataBottomTop.up" || nameDir == "dataTopBottom.down") {
$pageBGs.eq(0).removeClass('active');
}
} else if (element == $page4[0]) {
if (nameDir == "dataBottomTop.down" || nameDir == "dataTopBottom.up") {
$pageBGs.eq(1).addClass('active');
} else if (nameDir == "dataBottomTop.up" || nameDir == "dataTopBottom.down") {
$pageBGs.eq(1).removeClass('active');
}
} else if (element == $page6[0]) {
if (nameDir == "dataBottomTop.down" || nameDir == "dataTopBottom.up") {
$pageBGs.eq(2).addClass('active');
} else if (nameDir == "dataBottomTop.up" || nameDir == "dataTopBottom.down") {
$pageBGs.eq(2).removeClass('active');
}
}
}
});
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant