so i have some code which looks like this :
var my_important_var_x = 'init'; // my global variable for storing one very important piece of info. [screen size/resolution]
function checkmyresolutin() {
// this tests the broswer/window resolution and print to the body [for css purposes]
var resolution_is = '768px';
my_important_var_x = resolution_is; // now the var contains the resolution
return my_important_Var_X;
}
checkmyresolutin(); // for getting the resolutoin on document ready.
$(window).resize(function(){
checkmyresolutin(); // this is the important part,every time the browser is resized i need to know ,certain function load/unload on certain resolutions.
});
function_abc(); // this is my problem,ill explain bellow,to keep this code block clean.
So after the checkmyresolutin()
is called when the browser is resized and it returns the resolution/sceensize and is stored in the my_important_var_x
variable ,i need to pass that latest information from that variable to the function_abc();
function...anyone ?
EDIT :
Guys,there are typos but ignore them,i did not copy paste my .js,becasuse it would take up to 400 lines,this is just an example ,the "logic" is what's important here.
I just need somehow to pass content of the enter code here
to the function_abc()
after the checkmyresolutin()
has been run by the jQuery resize function()