copy termlist on small screens to the end of the page
authorWolfram Schneider <wosch@indexdata.dk>
Fri, 28 Jun 2013 14:28:12 +0000 (14:28 +0000)
committerWolfram Schneider <wosch@indexdata.dk>
Fri, 28 Jun 2013 14:28:12 +0000 (14:28 +0000)
resize after documented loaded (first time)

experiments/spclient/index-mobile.html

index 0bcd4dc..c20edcf 100644 (file)
                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("");
           }
        };
     </script>