I need to have some variable values change on window.resize().
I already found that you need to declare the variables outside the .resize function scope, i then try to change their values in the function .resize scope. But this doesn't seem to work.
var windowHeight = $(window).height();
var goPanel0, goPanel1, goPanel2, goPanel3;
goPanel0 = 0;
goPanel1 = windowHeight;
goPanel2 = windowHeight * 2;
goPanel3 = windowHeight * 3;
$(window).resize(function(){
goPanel1 = windowHeight;
goPanel2 = windowHeight * 2;
goPanel3 = windowHeight * 3;
//alert(goPanel3);
});
Thx,
resize()