高さのみが設定された画像のセット(ギャラリー)があるimg: height:200px;
ため、すべての画像の高さは同じですが幅が異なり、すべての画像の幅を取得する必要があります。
それは可能ですか?
現在私が使用しているもの:
var accum_width = 0;
$('.scroll-content-item img').each(function() {
accum_width += $(this).width() + 20;
});
alert(accum_width);
$( ".scroll-content" ).css('width', accum_width);
しかし、私は100(マージン)を取得しています。何か案は?
ありがとうございました