Skip to main content
added 14 characters in body
Source Link
Manu Karki
  • 103
  • 3
  • 14
var windowWidth = $(window).width();    
function mobileResponsiveCheck(){
    if(windowWidth >= 768){
        box3Responsiveness();
    }else if(windowWidth < 768){
        null;
    }
}

$(window).resize(function(){
    mobileResponsiveCheck();
});
mobileResponsiveCheck();

So I want to run the function mobileResponsiveCheck() every time the user resizes and also if reloaded. While resizing if window gets smaller than 768px then it is supposed to do nothing. But this only happens when I reload it after it is smaller than 768px. What I want is it box3Responsiveness() stopped as the user is resizing and getsget below 768px without reload.

var windowWidth = $(window).width();    
function mobileResponsiveCheck(){
    if(windowWidth >= 768){
        box3Responsiveness();
    }else if(windowWidth < 768){
        null;
    }
}

$(window).resize(function(){
    mobileResponsiveCheck();
});
mobileResponsiveCheck();

So I want to run the function mobileResponsiveCheck() every time the user resizes and also if reloaded. While resizing if window gets smaller than 768px then it is supposed to do nothing. But this only happens when I reload it after it is smaller than 768px. What I want is it box3Responsiveness() stopped as the user is resizing and gets below 768px.

var windowWidth = $(window).width();    
function mobileResponsiveCheck(){
    if(windowWidth >= 768){
        box3Responsiveness();
    }else if(windowWidth < 768){
        null;
    }
}

$(window).resize(function(){
    mobileResponsiveCheck();
});
mobileResponsiveCheck();

So I want to run the function mobileResponsiveCheck() every time the user resizes and also if reloaded. While resizing if window gets smaller than 768px then it is supposed to do nothing. But this only happens when I reload it after it is smaller than 768px. What I want is it box3Responsiveness() stopped as the user is resizing and get below 768px without reload.

Source Link
Manu Karki
  • 103
  • 3
  • 14

Window resize event

var windowWidth = $(window).width();    
function mobileResponsiveCheck(){
    if(windowWidth >= 768){
        box3Responsiveness();
    }else if(windowWidth < 768){
        null;
    }
}

$(window).resize(function(){
    mobileResponsiveCheck();
});
mobileResponsiveCheck();

So I want to run the function mobileResponsiveCheck() every time the user resizes and also if reloaded. While resizing if window gets smaller than 768px then it is supposed to do nothing. But this only happens when I reload it after it is smaller than 768px. What I want is it box3Responsiveness() stopped as the user is resizing and gets below 768px.