Reputation: 785
i want to get the height property of a object:
$('.selector img').each(function(index,e){
thisImage = $('#topContent img').get(index);
}
so long no problem, but then i want to get the height like this:
thisImage.height;
i thought it was equvivilent to:
thisImage.height();
or:
thisImage.css("height");
but neither does work for me.
And the greatest problem is that
thisImage.height;
Dose not work in chrome.
Have i missed something or is this a known bug? is there another way to get the height in chrome?
Upvotes: 0
Views: 559
Reputation: 60413
Specifically the object returned by get()
is going to be the actual DOMElement not the jQuery object so you need to wrap it in jq. like $(thisImage).height()
or use the actual selector as Catfish suggests.
Upvotes: 1