これだとコンソールには0,0てでて、width/heightが取得できない。
.height(100)とかすると大きさは変わる。
$('.hoge').each(function (i) {
var image = $(this).find('img');
var w = image.width();
var h = image.height();
console.log(w,h);
});
});
More than 5 years have passed since last update.
これだとコンソールには0,0てでて、width/heightが取得できない。
.height(100)とかすると大きさは変わる。
$('.hoge').each(function (i) {
var image = $(this).find('img');
var w = image.width();
var h = image.height();
console.log(w,h);
});
});
Register as a new user and use Qiita more conveniently