I have a very strange problem, I had never encountered it.
...
function resizeResponsivo() {
var
width = window.innerWidth,
height = window.innerHeight;
if ( width < 651 && keys[0]) {
keys[0] = false;
keys[2] = true;
//
$(menuBlockB).css('float','left');
resizeResponsivo();
//
} else if (width < 493 && keys[1]) {
keys[1] = false;
keys[3] = true;
//
$(forumBoxLast).hide(function() {
...
When the user enters the site, I run the function to fit the template on the page, it performs the first condition, the second it stops, but if I put an alert (); in both functions it performs normally. Example:
if ( width < 651 && keys[0]) {
alert();
...
else if ( width < 493 && keys[1] ) {
alert();
How can I fix this error?
Resolved content, I put the function inside a setTimeout () and it worked:)