jQuery移动端上拉查看详情
插件特效

插件描述:手机APP中常看到的上拉查看详情效果,跳转到tab栏中详情
使用方法
引样式与js:
1 2 3 | <link rel="stylesheet" href="css/style.css"><scriptt src="js/iscroll.js"></scriptt> |
应用的js:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | var myscroll = new iscroll("wrapper", { onscrollmove: function() { if ((this.y + 70) < (this.maxscrolly)) { $('.pull_icon').addclass('flip') } else { $('.pull_icon').removeclass('flip loading') } }, onscrollend: function() { if ($('.pull_icon').hasclass('flip')) { pullupaction() } }, onrefresh: function() { $('.more').removeclass('flip') }});function pullupaction() { settimeout(function() { $('.tab_box li').eq(0).removeclass('active'); $('.tab_box li').eq(1).addclass('active'); $('.tab_cont').hide(); $('.tab_cont').eq(1).show() }, 400)}if ($('.scroller').height() < $('#wrapper').height()) { $('.more').hide(); myscroll.destroy()}$('.tab_box li').on('click', function() { $(this).siblings('li').removeclass('active'); $(this).addclass('active'); var index = $(this).index(); $('.tab_cont').hide(); $('.tab_cont').eq(index).show()} |
评论