function resizePage() {
var list = ["mkwsSwitch", "mkwsLang"];
- var parent = $(".mkwsTermlists").parent();
var targetWidth = mkws.config.responsive_design_width;
var width = $(window).width();
} else {
log("already narrow");
}
- mkws.width = width;
- if (width <= targetWidth &&
- parent.hasClass("mkwsTermlist-Container-wide")) {
+ if (mkws.width > targetWidth && width <= targetWidth) {
log("changing from wide to narrow: " + width);
$(".mkwsTermlist-Container-wide").hide();
$(".mkwsTermlist-Container-narrow").show();
$("." + list[i] + ".mkwsTeam_" + tname).hide();
}
}
- } else if (width > targetWidth &&
- parent.hasClass("mkwsTermlist-Container-narrow")) {
+ } else if (mkws.width <= targetWidth && width > targetWidth) {
log("changing from narrow to wide: " + width);
$(".mkwsTermlist-Container-wide").show();
$(".mkwsTermlist-Container-narrow").hide();
}
}
}
+
+ mkws.width = width;
};