I have an element <video>generated by js and I need to get its height and width.
var v = $('video'); v.height() returns null, because when it starts, the video is not yet loaded, so there are no dimensions in the DOM.
How to check if the video received a measurement, and if not, wait until it receives the height and width.
Thank.
Edit:
I created jsbin with my sample code:
http://jsbin.com/udazu/2/edit
Thank.
Edit: screams, made a mistake in the sample code.
source
share