I have used outerHeight
and outerWidth
on many places. Now, after jQuery 1.8 was released I have met a lot of issues caused by object return instead of its size.
For example:
$('#stackoverflowdiv').Height() // returns 100 px
$('#stackoverflowdiv').outerHeight() // returns "stackoverflowdiv" div
The only thing that I have found to fix this was to use "true/false" in the function as follows but the I get the same results as the standard width()
and height()
functions:
$('#stackoverflowdiv').outerHeight(true) // returns 100 px
$('#stackoverflowdiv').outerHeight(false) // returns 100 px
Has anyone knew why this is not working any more or other way to get the height/width of element + its margins.
EDIT: I started to believe that this is caused because I am selecting elements in iframe using contents()
function. I will try to make a demo.