jquery单页全屏滚动js特效

下载地址

jquery鼠标控制页面全屏图片滚动代码。// JavaScript Document$(".ddw").val(0);$(".ddw2").val(0);setTimeout(function(){$(".num").eq(0).find("p").stop().animate({"top":"50%"},500) },500); $(function(){$(".num_box").mousewheel(function(event, delta) { var aaaa=$(".ddw2").val(); if (aaaa == 1){ return; } qpgd(delta);});});function qpgd(a){ var z =$(".ddw").val(); b = parseInt(z); c = $(".num").length;if(a<0){ if(-b==c-1){ return; } b-=1; $(".ddw2").val(1); }else if(a>0){ if(-b==0){ return; } b+=1; $(".ddw2").val(1); }if(-b==0){$(".num").eq(1).find("p").animate({"top":"0"},500);setTimeout(function(){$(".num").eq(0).find("p").animate({"top":"50%"},500); },1600); }else if(-b==1){$(".num").eq(0).find("p").animate({"top":"0"},500);$(".num").eq(2).find("p").animate({"top":"0"},500);setTimeout(function(){$(".num").eq(1).find("p").animate({"top":"50%"},500); },1600); }else if(-b==2){$(".num").eq(1).find("p").animate({"top":"0"},500);$(".num").eq(3).find("p").animate({"top":"0"},500);setTimeout(function(){$(".num").eq(2).find("p").animate({"top":"50%"},500); },1600); }else if(-b==3){$(".num").eq(2).find("p").animate({"top":"0"},500);$(".num").eq(4).find("p").animate({"top":"0"},500);setTimeout(function(){$(".num").eq(3).find("p").animate({"top":"50%"},500); },1600); } else if(-b==4){$(".num").eq(3).find("p").animate({"top":"0"},500);$(".num").eq(5).find("p").animate({"top":"0"},500);setTimeout(function(){$(".num").eq(4).find("p").animate({"top":"50%"},500); },1600); } else if(-b==5){$(".num").eq(4).find("p").animate({"top":"0"},500);setTimeout(function(){$(".num").eq(5).find("p").animate({"top":"50%"},500); },1600); } $(".ddw").val(b);$(".fixed_r li").eq(-b).addClass("on").siblings("li").removeClass("on");var single_hh = $(window).height();click_hh =-single_hh*b;$(".num_box").animate({"bottom": click_hh},1000);setTimeout(function(){ $(".ddw2").val(0); },1400);} $(".fixed_r li").eq(0).addClass("on"); $(".fixed_r li").click(function(){ var b = $(this).index(); $(this).addClass("on").siblings("li").removeClass("on"); $(".ddw").val(-b);/*---------------------*/if(b==0){$(".num").eq(1).find("p").animate({"top":"0"},500);setTimeout(function(){$(".num").eq(0).find("p").animate({"top":"50%"},500); },1600); }else if(b==1){$(".num").eq(0).find("p").animate({"top":"0"},500);$(".num").eq(2).find("p").animate({"top":"0"},500);setTimeout(function(){$(".num").eq(1).find("p").animate({"top":"50%"},500); },1600); }else if(b==2){$(".num").eq(1).find("p").animate({"top":"0"},500);$(".num").eq(3).find("p").animate({"top":"0"},500);setTimeout(function(){$(".num").eq(2).find("p").animate({"top":"50%"},500); },1600); }else if(b==3){$(".num").eq(2).find("p").animate({"top":"0"},500);$(".num").eq(4).find("p").animate({"top":"0"},500);setTimeout(function(){$(".num").eq(3).find("p").animate({"top":"50%"},500); },1600); } else if(b==4){$(".num").eq(3).find("p").animate({"top":"0"},500);$(".num").eq(5).find("p").animate({"top":"0"},500);setTimeout(function(){$(".num").eq(4).find("p").animate({"top":"50%"},500); },1600); } else if(-b==5){$(".num").eq(4).find("p").animate({"top":"0"},500);setTimeout(function(){$(".num").eq(5).find("p").animate({"top":"50%"},500); },1600); } /*---------------------*/var single_hh = $(window).height();click_hh =single_hh*b;$(".num_box").animate({"bottom": click_hh},1000); })function quanp(){var single_hh = $(window).height();var single_ww = $(window).width();$(".num").height(single_hh);$(".num li").width(single_ww);}quanp();$(window).resize(function(){ if (typeof indexSlides != "undefined" && indexSlides.reformat) indexSlides.reformat(); quanp();});

2822_2bc1eb1582822acfb0f8692898fdcc5e.jpg

dd:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值