Reputation: 21
When I use JQuery to try and get the height/width in pixels of an element, it gives me a decimal. For instance, calling $("#someDiv").height()
returns something like 599.91239131923
if I have #someDiv {height: 600px;}
. I'm wondering if there's some function where I could actually return the number 600
, corresponding to the number I set the height
to be on page load. I need that number as a constant that I use elsewhere in my web app.
Upvotes: 2
Views: 191