I have to rotate my image in 3d as shown in below image .There is blue line .I need to rotate my image in this direction when swipe up and down .please ignore green green line is there any way when I swipe up or swipe down it spin / rotate some angle ..
here is my fiddle http://jsfiddle.net/wemsbtwj/2/
function scrolling() {
$("img").css({
'transform': 'rotate(' + ($("main").scrollTop() / mainHeight * 360) + 'deg)'
});
}
var mainHeight = $("main").height();
window.addEventListener("scroll", scrolling, false);