0

I have 2 elemenets. One is scaled down in the CSS

.firstElement{
-webkit-transform:scale(.5,.5);
}

and the other is scaled inline by jQuery's

secondElement.animate({scale:.2, origin:[0,0])}

I need to get the width and height of the secondElement and the firstElement in pixels after they are scaled down. I tried everything, Im really not sure why I cant get this. Anyone have any ideas? Thanks

DevWev
  • 13
  • 3
  • have a look at [calculate width of scaled element](http://stackoverflow.com/questions/5834624/retrieve-width-height-of-a-css3-scaled-element#answer-5835579) – Deepak Ingole Sep 11 '13 at 03:51

1 Answers1

0
var matrix = window.getComputedStyle(this).webkitTransform,
        data;
    if (matrix != 'none') {
        data = matrix.split('(')[1].split(')')[0].split(',');
    } else {
        data = [1,null,null,1];
    }

Code Courtesy : CSS TRICKS

FIDDLE DEMO

Vaibs_Cool
  • 6,126
  • 5
  • 28
  • 61