Marty.H Marty.H - 1 month ago 11x
jQuery Question

What can cause height() to return as a negative value?

This is my code to see the height of an element:

console.log($(".divText").height()); // Returns negative value
console.log($(".divText").outerHeight()); // returns zero

I have the code execute on a click event, the page displays the element, I am selecting the correct element and there are no floats involved. What else can cause this to happen?


Put that code inside

    //your code