I have the following code:
var posts = elementToAdd.find(".post");
posts.each(function(i, e) {
var elementHeight = e.height() // BANG!
});
Posts contains many matched elements, which I’m trying to loop and perform logic based on each element’s height, but the individual elements don’t have the height property, so how can I get around this?
.height()is a jQuery method, to use it create a jQuery object from the element.Also take a look at
.outerHeight()