Commit 03f9212d authored by zhangyanni's avatar zhangyanni

bugs

parent 42169be8
......@@ -64,7 +64,7 @@
progress.style.width = '0px';
evenBox.style.left = '0px';
}
}
};
function getOffset(box,direction){
var setDirection = (direction == 'top') ? 'offsetTop' : 'offsetLeft' ;
var offset = box[setDirection];
......@@ -73,16 +73,16 @@
offset+=parentBox[setDirection];
parentBox = parentBox.offsetParent;
}
// parentBox = null;
parentBox = null;
return parseInt(offset);
}
};
evenBox.addEventListener(boxEven['0'], function(e) {
e = (boxEven['0'] == 'touchstart') ? e.touches[0] : e || window.event;
goX = e.clientX;
offsetLeft = getOffset(box,'left');
deviation = this.clientWidth;
evenWidth = box.clientWidth - deviation;
endX;
goX = e.clientX,
offsetLeft = getOffset(box,'left'),
deviation = this.clientWidth,
evenWidth = box.clientWidth - deviation,
endX;
document.addEventListener(boxEven['1'],moveFn,false);
document.addEventListener(boxEven['2'],removeFn,false);
},false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment