I'm using jQuery (v1.7.1) and I need to get the absolute, floating-point width of an element, but all of jQuery's width methods seem to be rounding-off the value of the width.
For example if the actual width of an element was 20.333333px
, jQuery's width method returns 20
, i.e ignoring the decimal value.
You can see what I mean on this jsFiddle
So, my question is: How do I get the floating-point value of the width of an element?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…