X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmkws-core.js;h=32e09f86ca89ee84d24659ea742de8e96d90c605;hb=40ad17b3ee7bd3df56853b9b58196d017fd1d631;hp=1ff2f2e10be835c1a25427e5467b813dfb4bdbe8;hpb=823cea5b1fc8a51b818e2a3a7784aac0c94447e7;p=mkws-moved-to-github.git diff --git a/src/mkws-core.js b/src/mkws-core.js index 1ff2f2e..32e09f8 100644 --- a/src/mkws-core.js +++ b/src/mkws-core.js @@ -336,11 +336,11 @@ mkws.pagerNext = function(tname) { var width = $(window).width(); var from, to, method; - if (mkws.width === undefined) { - // No state change, since we have no previous state - } else if (mkws.width > threshhold && width <= threshhold) { + if ((mkws.width === undefined || mkws.width > threshhold) && + width <= threshhold) { from = "wide"; to = "narrow"; method = "hide"; - } else if (mkws.width <= threshhold && width > threshhold) { + } else if ((mkws.width === undefined || mkws.width <= threshhold) && + width > threshhold) { from = "narrow"; to = "wide"; method = "show"; } mkws.width = width;