i need to rotate an image onmouseover function using Jquery
file.js
$("#logo").rotate({
bind:
{
mouseover: function ()
{$(this).rotate({ animateTo: 180 })},
mouseout: function ()
{$(this).rotate({ animateTo: 0 })}
}
});
HTML
<script type="text/javascript" src="../script/file.js"></script>
<img id="logo" src="../images/logo.png" alt="none" />
Is there anything wrong in this code? BTW, I found this code on the internet. There is no function call as rotate() in JavaScript then how can it work? Please give any link so that I can understand.
Please ignore this question if it looks like a foolish thing to ask :)