Javascript Question |
I thought I would post this question on here but not much to do with CI
I have a img which I am using holder.js Code: <div class="header-wrapper "> I need to get the height of the img on my javascript but all ways return 0 Code: <script> Any ideas and examples?
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
06-24-2016, 06:10 AM
(This post was last modified: 06-24-2016, 09:02 AM by ivantcholakov. Edit Reason: a typo )
I think, before measuring the height the image has to be loaded first for sure. This does not happen on document.ready event. See https://github.com/desandro/imagesloaded
|
Welcome Guest, Not a member yet? Register Sign In |