Skip to content

Commit

Permalink
Paralax removed
Browse files Browse the repository at this point in the history
  • Loading branch information
daliborjanak committed Jan 5, 2016
1 parent 3efb145 commit aaec6f0
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -373,28 +373,6 @@ <h2>About us</h2>

}

//parallax view
document.addEventListener('mousemove', function(event) {
var bodyWidth = document.body.clientWidth;
cx = Math.ceil(bodyWidth / 2.0);
cy = Math.ceil(bodyWidth / 2.0);
dx = event.pageX - cx;
dy = event.pageY - cy;

tiltx = (dy / cy);
tilty = -(dx / cx);
radius = Math.sqrt(Math.pow(tiltx, 2) + Math.pow(tilty, 2));
degree = (radius * 11);

var paralax = document.getElementById('paralax');
paralax.style.webkitTransform = 'rotate3d(' + tiltx + ', '
+ tilty + ', 0, ' + degree + 'deg)';
var btnLearn = document.getElementById('btn-learnmore');
btnLearn.style.webkitTransform = 'rotate3d(' + tiltx + ', '
+ tilty + ', 0, ' + degree + 'deg)';
});


(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
Expand Down

0 comments on commit aaec6f0

Please sign in to comment.