From 79eeb6dd96785f246d6dd09a1348ec278b81c097 Mon Sep 17 00:00:00 2001 From: Keller Renato Kichel Date: Wed, 4 May 2016 15:18:11 -0300 Subject: [PATCH] Width like css Breakpoint updated width to get same width of css breakpoints, make these with fallback to older clientes and IE clientes... --- src/js/lightslider.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/lightslider.js b/src/js/lightslider.js index aa84598..5104836 100644 --- a/src/js/lightslider.js +++ b/src/js/lightslider.js @@ -67,7 +67,7 @@ settings.vertical = false; } var $children = $el.children(), - windowW = $(window).width(), + windowW = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, breakpoint = null, resposiveObj = null, length = 0, @@ -87,7 +87,7 @@ var refresh = {}; refresh.chbreakpoint = function () { - windowW = $(window).width(); + windowW = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; if (settings.responsive.length) { var item; if (settings.autoWidth === false) { @@ -1137,4 +1137,4 @@ }); return this; }; -}(jQuery)); \ No newline at end of file +}(jQuery));