码迷,mamicode.com
首页 > Web开发 > 详细

jquery分享到

时间:2016-07-30 13:39:39      阅读:174      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!