Skip to content

Commit

Permalink
Added accordion toggle callback
Browse files Browse the repository at this point in the history
  • Loading branch information
spanasik committed Apr 17, 2014
1 parent 2344a82 commit fd42e97
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/foundation/foundation.accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
settings : {
active_class: 'active',
multi_expand: false,
toggleable: true
toggleable: true,
callback : function () {}
},

init : function (scope, method, options) {
Expand Down Expand Up @@ -47,6 +48,7 @@
}

target.addClass(settings.active_class).parent().addClass(settings.active_class);
settings.callback(target);
});
},

Expand Down

1 comment on commit fd42e97

@joelkinzel
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This callback will only fire when a non-active accordion is clicked. It would be helpful if it fired every time an accordion panel is clicked (so that if a user clicks and active accordion to close it, we can tie into that event as well).

Please sign in to comment.