实现同时运动且能实现链式运动的方法:
startMove(this,{'width':400},function(obj){
startMove(obj,{'height':200});
});
另外,if(fn){
fn();
}
改为,if(fn){
fn(obj);
}
startMove(this,{'width':400},function(obj){
startMove(obj,{'height':200});
});
另外,if(fn){
fn();
}
改为,if(fn){
fn(obj);
}
2016-11-09
投机取巧。。。。。。。。
</head>
<body>
<div id="div1"></div>
<script type="text/javascript">
var odiv=document.getElementById("div1");
odiv.onmouseover=function(){odiv.style.opacity=1;}
odiv.onmouseout=function(){odiv.style.opacity=0.3;}
</script>
</body>
</html>
</head>
<body>
<div id="div1"></div>
<script type="text/javascript">
var odiv=document.getElementById("div1");
odiv.onmouseover=function(){odiv.style.opacity=1;}
odiv.onmouseout=function(){odiv.style.opacity=0.3;}
</script>
</body>
</html>
2016-11-05
if(iCur != iTarget){
flag = false;
if(attr == 'opacity'){
...
}else{
...
}
}
flag = false;
if(attr == 'opacity'){
...
}else{
...
}
}
2016-11-05