I do not think that you can get the height of any object created at runtime before adding it to the document.
jQuery executes and gets the result of the entire ready-made DOM object available in the document (your html). Therefore, before adding u cannot get height.
If you still want to get the height, I can offer you a temporary div place in html where you can add the current div and check the height. if you want you to add a div where you want later.
We hope this helps you find a solution ...
Murtaza
source share