Team:StanfordBrownSpelman/jquery.rotate

From 2014.igem.org

(Difference between revisions)
 
(One intermediate revision not shown)
Line 54: Line 54:
});
});
*/
*/
-
 
-
$(document).ready(function() { $('a').css({"text-decoration": "none"}); }
 

Latest revision as of 16:54, 27 August 2014

$(document).ready(function() { //This is for rotate on hover only $(function(){

   var t;
   angle = 0;
   $(".sub3 img, .projecticon-cellulose-acetate img, #connect img").rotate({
  bind:
    {
       mouseover : function() {
           $(this).rotate({animateTo:40})
       },
       mouseout : function() {
           $(this).rotate({animateTo:0})
       }
    }

});

   $(".sub2 img").rotate({
  bind:
    {
       mouseover : function() {
           $(this).rotate({animateTo:-40})
       },
       mouseout : function() {
           $(this).rotate({animateTo:0})
       }
    }

}); }); });


/* $(document).ready(function() { $(function(){

   var t;
       var angle = 0;
       t = setInterval(function(){
           angle+=3;
           $('.sub3 img').rotate(angle);
       },50);

});

$(function(){

   var t;
       var angle = 0;
       t = setInterval(function(){
           angle-=3;
           $('.sub2 img').rotate(angle);
       },50);

}); });

  • /