Showing
1 changed file
with
13 additions
and
16 deletions
@@ -40,12 +40,9 @@ $curNav = $navList.children('.focus'); | @@ -40,12 +40,9 @@ $curNav = $navList.children('.focus'); | ||
40 | navHammer = new Hammer($navList[0]); | 40 | navHammer = new Hammer($navList[0]); |
41 | navHammer.on('tap', function(e) { | 41 | navHammer.on('tap', function(e) { |
42 | var $this = $(e.target).closest('li'), | 42 | var $this = $(e.target).closest('li'), |
43 | -//$('#maybe-like-nav').delegate('li', 'touchstart', function() { | ||
44 | -// var $this = $(this), | ||
45 | $goods = $('.goods-list'), | 43 | $goods = $('.goods-list'), |
46 | $content; | 44 | $content; |
47 | 45 | ||
48 | - | ||
49 | if ($this.hasClass('focus')) { | 46 | if ($this.hasClass('focus')) { |
50 | return; | 47 | return; |
51 | } | 48 | } |
@@ -64,23 +61,12 @@ navHammer.on('tap', function(e) { | @@ -64,23 +61,12 @@ navHammer.on('tap', function(e) { | ||
64 | $(document).trigger('scroll'); //Trigger lazyLoad | 61 | $(document).trigger('scroll'); //Trigger lazyLoad |
65 | }); | 62 | }); |
66 | 63 | ||
67 | -$('.maybe-like p').on('touchstart', function (e) { | ||
68 | - search(); | ||
69 | -}); | ||
70 | - | ||
71 | -//srcoll to load more | ||
72 | -$(window).scroll(function () { | ||
73 | - if ($(window).scrollTop() + winH >= $(document).height() - loadMoreH - 50) { | ||
74 | - search(); | ||
75 | - } | ||
76 | -}); | ||
77 | - | ||
78 | function search() { | 64 | function search() { |
79 | if (loading) { | 65 | if (loading) { |
80 | return; | 66 | return; |
81 | } | 67 | } |
82 | loading = true; | 68 | loading = true; |
83 | - | 69 | + |
84 | //num = $goodList.find('.good-info').length; | 70 | //num = $goodList.find('.good-info').length; |
85 | $.ajax({ | 71 | $.ajax({ |
86 | type: 'GET', | 72 | type: 'GET', |
@@ -134,4 +120,15 @@ function search() { | @@ -134,4 +120,15 @@ function search() { | ||
134 | loading = false; | 120 | loading = false; |
135 | } | 121 | } |
136 | }); | 122 | }); |
137 | -} | ||
123 | +} | ||
124 | + | ||
125 | +$('.maybe-like p').on('touchstart', function (e) { | ||
126 | + search(); | ||
127 | +}); | ||
128 | + | ||
129 | +//srcoll to load more | ||
130 | +$(window).scroll(function () { | ||
131 | + if ($(window).scrollTop() + winH >= $(document).height() - loadMoreH - 50) { | ||
132 | + search(); | ||
133 | + } | ||
134 | +}); |
-
Please register or login to post a comment