If anyone remembers the old Moods of Norway website, there was a track with wheels spinning forward and backward while you were scrolling the page (horizontally). I can't achieve similar effect with a bike.
This is what I have so far:
$(window).bind( "scroll", function() {
$("#wheel1, #wheel2").css({
'-moz-transform':'rotate(360deg)',
'-webkit-transform':'rotate(360deg)',
'-o-transform':'rotate(360deg)',
'-ms-transform':'rotate(360deg)',
'-webkit-transition-duration':'3s',
'-webkit-transition-delay':'now',
'-webkit-animation-timing-function':'linear',
'-webkit-animation-iteration-count':'infinite',
'-webkit-animation':'rotating 2s linear infinite'
});
});
The wheels make this 360 degree rotation for 1st time you start scrolling and that's it. I need the wheels to rotate while you scroll, plus I need them to rotate clockwise when you move forward and anticlockwise when you scroll back. If that would also work when you scroll the page using anchored links that would be perfect.
Please help me out :)