X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=tools%2Fhtdocs%2Fmkws.js;h=7827b688a8bb317778f1f62e82b73e0f255c266a;hb=417616ae68f17377347f773f30d8fc5822a2d0e8;hp=57bc3f5f41fce0b4c7236cedebe3905ceae59f1f;hpb=34a5a96555b7137ab614e29765ca5eaa60de3654;p=mkws-moved-to-github.git
diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js
index 57bc3f5..7827b68 100644
--- a/tools/htdocs/mkws.js
+++ b/tools/htdocs/mkws.js
@@ -583,7 +583,7 @@ function mkws_html_all(config) {
$("#mkwsResults").html('\
\
\
- \
+ | \
\
| \
\
@@ -593,6 +593,11 @@ function mkws_html_all(config) {
\
| \
\
+ \
+ \
+ \
+ | \
+
\
');
}
@@ -781,27 +786,28 @@ function mkws_html_lang(mkws_config) {
}
function mkws_mobile_resize () {
- debug("resize width: " + $(window).height() + ", width: " + $(window).width());
+ debug("resize height: " + $(window).height() + ", width: " + $(window).width());
var list = ["mkwsSwitch"];
var obj;
// alert($(window).width());
var width = mkws_config.responsive_design_width || 980;
+ var parentId = $("#mkwsTermlists").parent().attr('id');
- if ($(window).width() <= width) {
+ if ($(window).width() <= width &&
+ parentId === "mkwsTermlistContainer1") {
+ debug("changing from wide to narrow");
+ $("#mkwsTermlists").appendTo($("#mkwsTermlistContainer2"));
for(var i = 0; i < list.length; i++) {
$("#" + list[i]).hide();
}
-
- $("#mkwsTermlists").hide();
- obj = $("#mkwsTermlists").html();
- $("#mkwsShiftedTermlists").html(obj);
- } else {
+ } else if ($(window).width() > width &&
+ parentId === "mkwsTermlistContainer2") {
+ debug("changing from narrow to wide");
+ $("#mkwsTermlists").appendTo($("#mkwsTermlistContainer1"));
for(var i = 0; i < list.length; i++) {
$("#" + list[i]).show();
}
- $("#mkwsTermlists").show();
- $("#mkwsShiftedTermlists").html("");
}
};