/*  get the image height */
function heightItem(){
  $("div.gallery .image img").load(function(){
  var height = $(this).height();
  alert(height);
  });
}

等到網頁全部ready完畢
如此寫法,可以確保可以抓到我要的img高度。

arrow
arrow

    cabuchi 發表在 痞客邦 留言(0) 人氣()