首页 > Web开发 > 详细

jquery分享到

时间:2016-07-30 13:38:05      阅读:274      评论:0      收藏:0      [点我收藏+]

原生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‘});
           });
      });

 

jquery分享到

原文:http://www.cnblogs.com/yang0902/p/5720764.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!