开发者

Google type image resize

I have the following problem-no matter how long the mouseover is I get images resized. I want the mouseover event to be 1.5 seconds(like google images don't get resized if you put the mouse over fo开发者_开发百科r a small period of time).Code:

$('a img').mouseover(function(){
            $(this).delay(1500).animate({
                width: "315px",
                height: "225px",
                marginLeft: "-50px"
            }, 1500 );
        }); 


http://sandbox.phpcode.eu/g/nyan-.php

it works

Google type image resize

<a href=""><img src="http://img.karaoketexty.cz/img/artists/37103/nyan-cat-229003.gif" width="145" height="125"/></a>
<script>
$('a img').hover(function(){
            $(this).delay(1500).animate({
                width: "315px",
                height: "225px",
            }, 100 );
        });
$('a img').mouseout(function(){

            $(this).animate({
                width: "115px",
                height: "125px",
            }, 1000 );

}); </script>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜