FOR REFERENCE:
After months of searching.. i came across this:
http://tympanus.net/TipsTricks/DirectionAwareHoverEffect/
The snippets should help figure out direction awareness
Question
So i have an oven that has knobs that rotate on mouse over. They unfortunately only go clockwise. Is there some way i can log which way the cursor enters the image, from the right or left and rotate it accordingly? I.E if from left, rotate clockwise, if from right, rotate anti-clockwise. That would make a nice feature. does jQuery handle such events well?
$(window).load(function () {
$('img.menuimg').rotate({
bind: {
mouseover: function () {
$(this).rotate({
center: ["50%", "68%"],
animateTo: 100,
})
},
mouseout: function () {
$(this).rotate({
center: ["50%", "68%"],
animateTo: 0,
})
}
}
});
});
Solution
FOR REFERENCE:
After months of searching.. i came across this:
http://tympanus.net/TipsTricks/DirectionAwareHoverEffect/
The snippets should help figure out direction awareness