Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into feature/web-list
Showing
3 changed files
with
14 additions
and
4 deletions
@@ -73,3 +73,9 @@ $action.on('touchend', '.del', function() { | @@ -73,3 +73,9 @@ $action.on('touchend', '.del', function() { | ||
73 | $confim.fadeIn(); | 73 | $confim.fadeIn(); |
74 | return false; | 74 | return false; |
75 | }); | 75 | }); |
76 | + | ||
77 | +$action.on('touchstart', 'a,span', function() { | ||
78 | + $(this).css('background', '#eee'); | ||
79 | +}).on('touchend touchcancel', 'a,span', function() { | ||
80 | + $(this).css('background', 'transparent'); | ||
81 | +}); |
@@ -16,12 +16,16 @@ function ajaxCurrencyDetail(page) { | @@ -16,12 +16,16 @@ function ajaxCurrencyDetail(page) { | ||
16 | }); | 16 | }); |
17 | } | 17 | } |
18 | 18 | ||
19 | -$(window).scroll(function() { | ||
20 | - if ($(window).scrollTop() + $(window).height() > $('body').height() - 1) { | 19 | +function scrollHandler() { |
20 | + if ($(window).scrollTop() + $(window).height() > $('body').height() - 100) { | ||
21 | page++; | 21 | page++; |
22 | ajaxCurrencyDetail(page); | 22 | ajaxCurrencyDetail(page); |
23 | return; | 23 | return; |
24 | } | 24 | } |
25 | +} | ||
26 | + | ||
27 | +$(window).scroll(function() { | ||
28 | + window.requestAnimationFrame(scrollHandler); | ||
25 | }); | 29 | }); |
26 | 30 | ||
27 | -ajaxCurrencyDetail(page); | ||
31 | +ajaxCurrencyDetail(page); |
-
Please register or login to post a comment