我已经为我的一个网站实现了serialscroll
现在我想突出显示当前元素/正在滚动的图像,对于其余的图像,我想使不透明度达到70%
在Serialscroll插件中有可能吗
提前感谢
获得解决方案
这是一个场景,我对我的一个网站使用串行滚动,我想突出显示不透明度为1的当前元素/图像,其余部分的不透明度应为0.5
要做到这一点,需要对init.js文件进行简单的调整
var$nav=$('.picture_holder img');
$('#gallery').serialScroll({
items:'td',
prev:'#btn-prev',
next:'#btn-next',
offset:-300, //when scrolling to photo, stop 230 before reaching it (from the left)
start:0, //as we are centering it, start at the 2nd
duration:1200,
force:true,
stop:true,
lock:false,
cycle:false, //don't pull back once you reach the end
easing:'easeOutQuart', //use this easing equation for a funny effect
jump: true,//click on the images to scroll to them
navigation:$nav,
onBefore:function(e,el,$p,$i,pos){
$nav.css('opacity','0.5');
$nav.eq(pos).css('opacity','1')},
});