2011-07-14 26 views
0

我有以下問題,無論是鼠標懸停多久,我得到縮放後的圖像。我想鼠標懸停時爲1.5秒(就像如果你把鼠標放在爲在一小段時間內谷歌圖片沒有得到調整)。代碼:谷歌類型的圖像調整

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

,你的問題是什麼? – genesis

回答

2

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

它的工作原理 http://img.karaoketexty.cz/img/artists/37103/nyan-cat-229003.gif

<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

我想編輯的調整大小 – George

+0

答案之前用戶鼠標在至少1.5秒。 – genesis