4
I’m having a really weird little problem, I’ve never run into him before.
...
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 adjust the template on the page, it performs the first condition, in 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 make it right?
Content solved, put the function inside a setTimeout() and worked :)
It must have been a deadlock even... with the asynchronous call that doesn’t happen.
– Robson Ataíde