From 221a1559700915ff8e678a987ee6ca65a0b78c47 Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Fri, 28 Jun 2013 14:28:12 +0000 Subject: [PATCH] copy termlist on small screens to the end of the page resize after documented loaded (first time) --- experiments/spclient/index-mobile.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/experiments/spclient/index-mobile.html b/experiments/spclient/index-mobile.html index 0bcd4dc..c20edcf 100644 --- a/experiments/spclient/index-mobile.html +++ b/experiments/spclient/index-mobile.html @@ -28,20 +28,26 @@ clearTimeout(timeout); timeout = setTimeout(function () { mobile_resize() }, 100); }); + $(document).ready(function() { mobile_resize() }); function mobile_resize () { debug("resize width: " + $(window).height() + ", width: " + $(window).width()); var list = ["mkwsSwitch"]; + var obj; if ($(window).width() <= 600) { for(var i = 0; i < list.length; i++) { $("#" + list[i]).hide(); } + $("#termlist").parent().hide(); + obj = $("#termlist").parent().html(); + $("#mkwsTermlist").html(obj); } else { for(var i = 0; i < list.length; i++) { $("#" + list[i]).show(); } $("#termlist").parent().show(); + $("#mkwsTermlist").html(""); } }; -- 1.7.10.4