From a00df7dc02d2a4b25b7c3f5c098dfbd5e59a534e Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Thu, 7 Jan 2016 01:01:01 +0000 Subject: [PATCH] max with for rows --- lib/js/nb.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/js/nb.js b/lib/js/nb.js index 6ec45081..4ca52f5d 100644 --- a/lib/js/nb.js +++ b/lib/js/nb.js @@ -18,6 +18,19 @@ function NB() { // Used in css to trigger a resize $('body').append(''); + + // Max width for blocks + var block = $("table, div"); + if (block) { + var width = $(window).width(); + if (block.width() > width) { + block.css({ + 'display': 'block', + 'overflow': 'scroll', + }).width(width - 10); + } + } + } this.table2div = function(find) { -- 2.47.3