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'});
           });
      });

 

posted @ 2016-07-30 13:09  河南小样  阅读(204)  评论(0编辑  收藏  举报