Receiving the wrong header height

0

I'm trying to catch the height of .ui-header to be able to have my dynamic program. It turns out that the height you are giving me is incorrect.

The code to catch the height of .ui-header :

//Altura do header
        var lv_headerHeight =  $(".ui-header").outerHeight();
        alert("HEADER " + lv_headerHeight);

This alert is returning:

ButusingtheChromedevtools,itindicatesthattheheightof.ui-headeris:

How can I get this last value? Thank you for your attention.

That is, I have this header:

The alert is giving me an incorrect height value while Chrome dev tools gives me the correct value. But I'm not getting it.

    
asked by anonymous 07.05.2015 / 17:19

1 answer

0

Try to get the X / Y coordinates of the left / top point:

img = document.getElementById('box');
imagemTopRightX = img.offsetLeft;
imagemTopRightY = img.offsetTop;
alert(imagemTopRightX);
alert(imagemTopRightY);
    
07.05.2015 / 17:47