2011-07-09 12 views

答えて

4

最も簡単な方法。 resizables.jsファイルのどこかにコードを入れてください。

/** 
* Copyright 2012, Val Kotlarov Hoffman. 
* Licensed under the GPL Version 2 license. 
* You may copy freely and distribute as long as this comment remains. 
**/ 

$(document).ready(function(){ 
    init_resizeables(); 
}); 

function init_resizeables() { 

    $('img').hover(
     function() { 
      $(this).stop().animate({ 
       'width':'444px' 
      },{ 
       duration:234 
      }).css({ 
       'z-index':'999', 
       'position':'absolute' 
      }); 
     }, 
     function() { 
      $(this).stop().animate({ 
       'width':'254px' 
      },{ 
       duration:345 
      }).css({ 
       'z-index':'1' 
      }); 
     }); 
} 

最初のwithは拡大画像の幅です。 2番目の幅はイメージの通常サイズです。これをあなたのhtmlファイルに含めれば完了です。何が必要にIMGセレクタを変更します。 お楽しみください。

関連する問題