From 9f6f8f7824bd20614bb2bf3027f2c18be7d72cfb Mon Sep 17 00:00:00 2001 From: Martijn van der Lee Date: Mon, 5 Dec 2016 21:20:30 +0100 Subject: [PATCH] Fix #36; use offsetWidth due to broken outerWidth in jQuery 3+ --- README.md | 2 +- bower.json | 2 +- jqcoverflow.jquery.json | 2 +- jquery.coverflow.js | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index aaae962..2846179 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ jQuery Coverflow ================ -Version 1.3.2 +Version 1.3.3 Copyright © 2013-2016 Martijn van der Lee (http://martijn.vanderlee.com). MIT Open Source license applies. diff --git a/bower.json b/bower.json index 0951c52..9f1100d 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "coverflow", - "version": "1.3.2", + "version": "1.3.3", "homepage": "https://github.com/vanderlee/coverflow", "authors": [ "Martijn van der Lee " diff --git a/jqcoverflow.jquery.json b/jqcoverflow.jquery.json index 2e23b6a..8ef3458 100644 --- a/jqcoverflow.jquery.json +++ b/jqcoverflow.jquery.json @@ -1,6 +1,6 @@ { "name": "jqcoverflow", - "version": "1.3.2", + "version": "1.3.3", "title": "Vanderlee Coverflow", "description": "A jQuery-based Coverflow components with optional mousewheel, CSS3 interpolation, transformations, touch swipe, reflections and more.", "author": { diff --git a/jquery.coverflow.js b/jquery.coverflow.js index 0163398..56608e2 100644 --- a/jquery.coverflow.js +++ b/jquery.coverflow.js @@ -269,12 +269,12 @@ _frame: function(frame) { frame = frame.toFixed(6); - + var that = this, covers = that._getCovers(), count = covers.length, - parentWidth = that.element.innerWidth(), - coverWidth = that.options.width || covers.first().outerWidth(), + parentWidth = that.element.innerWidth(), + coverWidth = that.options.width || covers.eq(this.options.index).show().get(0).offsetWidth, visible = that.options.visible === 'density' ? Math.round(parentWidth * that.options.density / coverWidth) : $.isNumeric(that.options.visible) ? that.options.visible : count,