My code is supposed to get the height of several items in a div. It works like a charm in Firefox, but in WebKit the is no height().
for (var i = 0; i < items.length; i++) {
var item = items[i];
var itemHeight;
var itemWidth;
var imageItem = $($(item).find('.teaser_image'));
itemWidth = imageItem.width();
if (itemWidth > this.imageWidth()) {
imageItem.width(this.imageWidth());
}
// TODO: Height-thingy works in Firefox but not in WebKit.
itemHeight = imageItem.height();
}
The strange thing is that the imageItem
object is correct in WebKit and Firefox. But if I use .height()
on it, it is 0 in WebKit.
The used jQuery Version is 1.7.2 and can not be changed.