javascript - how to get the exact height of header in jquery mobile -
i'm new jqm , want exact height of header, can't seem accurately. need iphone app should detect header's height on iphone 4 retina display (or ipad).
my current test is:
<div data-role="page" data-theme="m"> <div id="hdr" data-role="header"> <a id="bk" href="index.html" data-role="button">back</a> <div style="margin:0 auto;text-align:center;"><img src="../images/lgo_iph.png" alt="" /></div> <a href="index.html" data-role="button">cancel</a> </div> </div> and height with:
$(document).live("pageshow", function(){ alert($('#hdr').outerheight(true)); }); which alerts 22, not correct if substitute $('#hdr') $('#bk') 28 height should smaller.
any help?
thank you.
Comments
Post a Comment