jQuery实现滑动字母进行检索

所属分类:UI,其他-滚动,杂项

 22577  358  查看评论 (5)
分享到微信朋友圈
X
jQuery实现滑动字母进行检索 ie兼容9

注:请在移动端查看最佳展示效果

关键代码

var domH = $(".term_nav li").height();
var domY,moveY,index,item_top;
$(".term_nav").on({
       touchstart: function (e) {
           startY = e.originalEvent.targetTouches[0].pageY;
       },
       touchmove: function (e) {  
       	e.preventDefault();          
           $("body").on({
               touchmove: function (e) {
                   e.preventDefault();
               }
           });
           domY = $(this).offset().top;
           moveY = e.originalEvent.targetTouches[0].pageY;
index = parseInt((moveY-domY)/domH);
$(".term_nav li").eq(index).addClass("on").siblings().removeClass("on");
       
item_top=$('.term_box').eq(index).offset().top-100;
$(window).scrollTop(item_top);
       },
       touchend: function () {
       	$("body").off("touchmove")
       }
});
相关插件-滚动,杂项

jQuery全屏视差滚动效果

jQuery全屏视差滚动效果
  滚动
 43708  434

jQuery仿京东楼层滑动侧边栏高亮(原创)

jQuery模仿京东侧边栏点击滑动到该楼层,同时侧边栏随着页面滚动对应导航高亮。
  滚动
 37864  408

jQuery电商网站楼层滚动定位

jQuery电商网站楼层滚动定位
  滚动
 55130  628

双向垂直上下滚动

垂直滚动插件,可切换向上或向下方向滚动。
  滚动
 46357  374

讨论这个项目(5)回答他人问题或分享插件使用方法奖励jQ币 评论用户自律公约

    . ?? .originally丶→.┵ 0
    2019/5/23 10:50:15
    这么写死 <h1>p </h1> <h4> PDS </h4>,
    怎么动态插入数据?? 回复
    zmr008 0
    2018/10/11 20:10:21
    66666666666666
        /n0
        2018/11/22 11:27:05
        怎么获取jq币
        uchaopin0
        2018/11/30 12:53:53
        每天签到或者充值
        追风少年李qq0
        2022/9/23 9:35:35
        可以充值jQ币或者VIP,发布资源、回答他人提问、分享插件使用方法也会奖励jQ币
    回复
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
取消回复