From: Mike Taylor Date: Tue, 9 Jul 2013 16:58:11 +0000 (+0100) Subject: Remove all timeout-related code from resizing support. X-Git-Tag: 0.9.1~301 X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=commitdiff_plain;h=f38e3b7c6f9c11c6626c8e07aec6e721a576885e Remove all timeout-related code from resizing support. Now we just reposition the div when we get a resize signal. --- diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 099e67f..56a9059 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -617,13 +617,7 @@ function mkws_html_all(config) { if (mkws_config.responsive_design) { // Responsive web design - change layout on the fly based on // current screen width. Required for mobile devices. - var timeout = null; - $(window).resize( function(e) { - if (timeout) - clearTimeout(timeout); - timeout = setTimeout(function () { mkws_mobile_resize() }, 50); - }); - + $(window).resize( function(e) { mkws_mobile_resize() }); // initial check after page load $(document).ready(function() { mkws_mobile_resize() }); }