|
@@ -297,9 +297,17 @@ seckillObj = { |
|
@@ -297,9 +297,17 @@ seckillObj = { |
297
|
},
|
297
|
},
|
298
|
|
298
|
|
299
|
bindEvents: function() {
|
299
|
bindEvents: function() {
|
|
|
300
|
+ var self = this;
|
|
|
301
|
+ var $nav = self.el.$navList;
|
|
|
302
|
+ var top = $nav.position().top + $nav.height();
|
|
|
303
|
+
|
300
|
if (yoho.isApp) {
|
304
|
if (yoho.isApp) {
|
301
|
this.$productList.on('click', '[data-remind]', $.proxy(this.toggleRemind, this));
|
305
|
this.$productList.on('click', '[data-remind]', $.proxy(this.toggleRemind, this));
|
302
|
}
|
306
|
}
|
|
|
307
|
+
|
|
|
308
|
+ $(document).on('scroll', function() {
|
|
|
309
|
+ $nav.toggleClass('fix-top', $(window).scrollTop() > top);
|
|
|
310
|
+ });
|
303
|
},
|
311
|
},
|
304
|
|
312
|
|
305
|
/*
|
313
|
/*
|