I am trying to equal the view template div in backbone view.
render: function(options){
var highestBox = 0;
this.collection.each(function(_itemData){
var item = new ItemView({model : _itemData});
this.$el.append(item.el);
if (item.$el.height() > highestBox){
highestBox = item.$el.height();
}
},this);
$('#container .item').height(highestBox + 90);
}
It works well in firefox yet in chrome, it returns height = 52px
when I do console.log(highestBox)
in this.collection
loop.
I supposed the height of the view will be set to be the highest one, but it didn't. Any idea what could be causing this. Thanks.