I'm using Polymer 2.x, I'm trying to preload the page, I made a div with a load gif and I'm going to get it with setTimeout ... But in the script when I use the function $. load it returns undefined. Could anyone help me put display none in div?
Follow the code
ready(){
super.ready();
setTimeout(function(){
this.$.load.classList.add('hidden'); //Classe adiciona display none
}, 4000);
}
<div id="load">
<img src="/* GIF */" alt="Loading..."/>
</div>