-1

If i have, a class with width: 20%, how to create a jquery function to change the class height to the same width of the class but in pixels?

  • search before posting http://stackoverflow.com/questions/10062811/height-div-based-on-percentage-based-width http://stackoverflow.com/questions/2648733/make-a-div-square-when-there-is-a-dynamically-changing-width-based-on-percenta – sukhjit dhot Sep 07 '13 at 18:24

1 Answers1

0

Working DEMO

Try this

 var pixels = parentWidth*(percent/100);
SarathSprakash
  • 4,614
  • 2
  • 19
  • 35