jQuery のanimateリファレンス

 

<!doctype html>
<html>
<head>
<meta charset="utf-8″/>
<script type="text/javascript" src="jquery.js"></script>
</head>

<body>
<img src="8fbf0884jw1drfmvfrhrhj.jpg" width="300″ height="300″/>
<button id="btn1″>拡大</button>
<button id="btn2″>縮小</button>
</body>
</html>
<script>
$(function(){
$('#btn1’).click(function(){
alert(“11");
$('img’).animate({width:1000,height:1000},500);
});
$('#btn2’).click(function(){
$('img’).animate({width:300,height:300},500);
});

});
</script>

Source

Posted by arkgame