0

I have a css class with a property, like:

myClass {
    height: 100px;
}

How do i get that height in javascript?

Jacs
  • 1,437
  • 4
  • 21
  • 31
  • Does this answer your question? [Get div height with plain JavaScript](https://stackoverflow.com/questions/15615552/get-div-height-with-plain-javascript) – jmargolisvt Jan 21 '20 at 03:19
  • No, i want to get height from class, not from div. – Jacs Jan 21 '20 at 03:19
  • Well, you'd get the height by getting the div with that class. You can't read a css stylesheet with js. – jmargolisvt Jan 21 '20 at 03:20
  • Neither with Jquery? – Jacs Jan 21 '20 at 03:23
  • 1
    This might be what you're looking for: https://stackoverflow.com/questions/324486/how-do-you-read-css-rule-values-with-javascript – jmargolisvt Jan 21 '20 at 03:26
  • Does this answer your question? [How do you read CSS rule values with JavaScript?](https://stackoverflow.com/questions/324486/how-do-you-read-css-rule-values-with-javascript) – Akhil Aravind Jan 21 '20 at 06:28

0 Answers0