Code cleanup and fixes

This commit is contained in:
Lim Chee Aun 2013-12-09 07:45:15 +08:00
parent 3eb32b25e1
commit 4ffb7be6ce

View File

@ -322,13 +322,11 @@ h1{
},
slide: function(event){
event.preventDefault();
newPosition = {
x: slider.startingPagePosition.x + (slider.startingMousePostition.x - event.clientX),
y: slider.startingPagePosition.y + (slider.startingMousePostition.y - event.clientY)
var x = slider.startingPagePosition.x + (slider.startingMousePostition.x - event.clientX);
var y = slider.startingPagePosition.y + (slider.startingMousePostition.y - event.clientY);
window.scrollTo(x, y);
}
};
window.scrollTo(newPosition.x, newPosition.y);
}
}
life.start();
slider.init();