I have a bootstrap modal having id myModal
.
In my javascript when i do something like
window.onload = function(){
var container = document.getElementById("myModal");
console.log(container.clientWidth);
}
It shows 0
.
How to get the clientWidth of a Bootstrap modal before it is opened?