Hi,
I’m currently on a project in development but I need to make for example this thing on JavaScript
var myWidth = $(element).width();
The problem is in development mode (yan start), the css is loaded by JS and my variable return to me the size of the browser because when I get my var, the CSS isn’t loaded yet.
But if I do this
setInterval(function(){
var myWidth = $(element).width();
}, 2000);
With that delay, I have the correct value.
There is a solution for that ? Any event listener or something else ?