jquery分享到

原生js:

window.onload=function(){
                var oBox=document.getElementById("box");
                var oTo=document.getElementById("to");
                oBox.onmouseover=function(){
                    move(oBox,{right:0},{time:500,easing:'ease-out'});
                }
                oBox.onmouseout=function(){
                    move(oBox,{right:-150},{time:500,easing:'ease-out'});
                }
            }

jquery:

$(function(){
           $('#box').hover(function(){
            move($(this)[0],{right:0},{time:500,easing:'ease-out'});
           },function(){
            move($(this)[0],{right:-150},{time:500,easing:'ease-out'});
           });
      });
原文地址:https://www.cnblogs.com/yang0902/p/5720764.html