Skip to content

Commit

Permalink
- fixup: default expanded box could have been ignored under certain c…
Browse files Browse the repository at this point in the history
…ircumstances
  • Loading branch information
zipper committed Aug 4, 2017
1 parent dd88bb4 commit f4e823e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dist/jquery.collapsable.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @copyright Copyright (c) 2014-2017 Radek Šerý
* @license MIT
*
* @version 2.0.5
* @version 2.0.6
*/
;(function($) {

Expand Down Expand Up @@ -162,7 +162,7 @@

// max 1 expanded item
if (this.opts.accordion) {
defaultExpanded = $items.index($('.' + this.opts.classNames.defaultExpanded));
defaultExpanded = $items.index( $items.filter('.' + this.opts.classNames.defaultExpanded) );

// max 1, we can return now
if (defaultExpanded !== -1) {
Expand Down
4 changes: 2 additions & 2 deletions dist/jquery.collapsable.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "jquery.collapsable",
"title": "jQuery Collapsable",
"description": "jQuery plugin for collapsable boxes",
"version": "2.0.5",
"version": "2.0.6",
"author": {
"name": "Radek Šerý",
"email": "[email protected]"
Expand Down
2 changes: 1 addition & 1 deletion src/jquery.collapsable.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@

// max 1 expanded item
if (this.opts.accordion) {
defaultExpanded = $items.index($('.' + this.opts.classNames.defaultExpanded));
defaultExpanded = $items.index( $items.filter('.' + this.opts.classNames.defaultExpanded) );

// max 1, we can return now
if (defaultExpanded !== -1) {
Expand Down

0 comments on commit f4e823e

Please sign in to comment.