12

Is there any jQuery solution that to find exact display height of the -webkit-transform: scale(0.7851);

the scale value may vary that is why looking for proper solution

Tested these options unfortunately didn't find solution yet :(

height()
innerHeight()
outerHeight()
outerHeight(true)

I think this issue only can fix one the basis of mathematics ;)

Mo.
  • 26,306
  • 36
  • 159
  • 225
  • 1
    Once the animation had over, take the height() and width of the element. –  May 09 '13 at 17:10
  • @EinerS thanks for your suggestion testing that way – Mo. May 09 '13 at 17:12
  • It seems the `height()` and `width()` methods don't (yet) take CSS transformations into account. [It's a known issue](http://bugs.jquery.com/ticket/11114). I think the best solution is to scale the image in jQuery instead of in CSS, if you need jQuery to compute the end result. Otherwise, parse the `-webkit-transform` value and extract the scaling factor yourself. – Blazemonger May 09 '13 at 17:13
  • Test these http://stackoverflow.com/questions/16405397/getting-height-of-scaled-image after the animation has ended. – RaphaelDDL May 09 '13 at 17:16

1 Answers1

37

Use getBoundingClientRect().

element.getBoundingClientRect().height

See DEMO.

Antony
  • 14,900
  • 10
  • 46
  • 74