Skip to content

Commit

Permalink
Fix #36; use offsetWidth due to broken outerWidth in jQuery 3+
Browse files Browse the repository at this point in the history
  • Loading branch information
Martijn van der Lee authored and Martijn van der Lee committed Dec 5, 2016
1 parent 075e23f commit 9f6f8f7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"
Expand Down
2 changes: 1 addition & 1 deletion jqcoverflow.jquery.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
6 changes: 3 additions & 3 deletions jquery.coverflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9f6f8f7

Please sign in to comment.