Authored by ccbikai

下拉刷新修改

@@ -21,8 +21,7 @@ function PullRefresh(seclector, options) { @@ -21,8 +21,7 @@ function PullRefresh(seclector, options) {
21 var $window = $(window), 21 var $window = $(window),
22 $em, 22 $em,
23 pullFormTop = false, 23 pullFormTop = false,
24 - pullStart,  
25 - topOffset; 24 + pullStart;
26 25
27 $em = $(seclector); 26 $em = $(seclector);
28 27
@@ -34,15 +33,13 @@ function PullRefresh(seclector, options) { @@ -34,15 +33,13 @@ function PullRefresh(seclector, options) {
34 $em.height(options.height); 33 $em.height(options.height);
35 } 34 }
36 35
37 - topOffset = -$em.outerHeight();  
38 -  
39 this.iScroll = new IScroll($em.get(0), { 36 this.iScroll = new IScroll($em.get(0), {
40 click: true, 37 click: true,
41 probeType: 3 38 probeType: 3
42 }); 39 });
43 40
44 this.iScroll.on('scrollStart', function() { 41 this.iScroll.on('scrollStart', function() {
45 - if (this.y >= topOffset) { 42 + if (this.y === 0) {
46 pullFormTop = true; 43 pullFormTop = true;
47 } 44 }
48 45