0

Weeblyでウェブサイトを作っています。マウスオーバーですべての画像のサイズを大きくしたい。中にはサイズが違うものもありますので、パーセントでやってみたいと思います。コードを見つけて自分で編集しようとしましたが、うまくいきません。使用してみたコードは次のとおりです。

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$('img').mouseover(grow);
$('img').mouseout(shrink);
});

function grow(){
$(this).css('height','150%');
$(this).css(‘width’,’auto’)
}

function shrink(){
$(this).css('height','100%');
$(this).css(‘width’,’auto’)
}
</script>

よろしくお願いします。:)

4

0 に答える 0