Team:Georgia State

From 2013.igem.org

(Difference between revisions)
Line 23: Line 23:
<script src="https://googledrive.com/host/0B4nfVqlTfnTzcWFJaDlrWDg0Z2M"></script>
<script src="https://googledrive.com/host/0B4nfVqlTfnTzcWFJaDlrWDg0Z2M"></script>
<script>
<script>
-
$( document ).ready(function() {
+
$(document).ready(function()
-
var img = $('#Navimg');
+
{
-
if(img.length > 0){
+
    $("#imgAnimate").hover(
-
    var offset = img.offset();
+
        function()
-
    function mouse(evt){
+
        {
-
        var center_x = (offset.left) + (img.width()/2);
+
            $(this).attr("src", "https://googledrive.com/host/0B4nfVqlTfnTzMFB3cGlCWXRMc2M");
-
        var center_y = (offset.top) + (img.height()/2);
+
         },
-
         var mouse_x = evt.pageX; var mouse_y = evt.pageY;
+
         function()
-
         var radians = Math.atan2(mouse_x - center_x, mouse_y - center_y);
+
         {
-
         var degree = (radians * (180 / Math.PI) * -1) + 90;
+
            $(this).attr("src", "https://googledrive.com/host/0B4nfVqlTfnTzZzhNTVhaemQ4QTg");
-
        img.css('-moz-transform', 'rotate('+degree+'deg)');
+
         });
-
        img.css('-webkit-transform', 'rotate('+degree+'deg)');
+
-
        img.css('-o-transform', 'rotate('+degree+'deg)');
+
-
         img.css('-ms-transform', 'rotate('+degree+'deg)');
+
-
    }
+
-
    $(document).mousemove(mouse);
+
-
}
+
});
});
</script>
</script>

Revision as of 18:32, 15 May 2013