Implemented same height JavaScript issue

  • Ruud van Lent
  • Ruud van Lent's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
More
1 month 3 days ago #1638 by Ruud van Lent
same height JavaScript issue was created by Ruud van Lent
the same Height javaScript function makes the height of elements the same height, it uses the clientHeight property of the elements.
The clientHeight function is triggered on Document load, but that the document is loaded doesn't mean the css is also loaded.
When the css is not loaded yet, cleintHeight always returns 0, which is not correct.
The topic has been locked.
  • Ruud van Lent
  • Ruud van Lent's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
More
1 month 3 days ago #1639 by Ruud van Lent
Replied by Ruud van Lent on topic same height JavaScript issue
refactored the script.js to also run the same height method on window load. Window load. Running it on window load guarantees that css is also loaded.

To avoid the height changing visibly (on window load) I also run it on document load.
The topic has been locked.

Log In or Sign Up

Forgot your password? / Forgot your username?