From c9c81e005fac4ed0133d94d29bbfa35b73436b48 Mon Sep 17 00:00:00 2001 From: jlukic Date: Mon, 10 Aug 2015 15:08:59 -0400 Subject: [PATCH] #2812, improve settings docs for accordion --- src/definitions/modules/accordion.js | 30 ++++++++++++++++------------ 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/definitions/modules/accordion.js b/src/definitions/modules/accordion.js index 60a4d2507..99849af85 100644 --- a/src/definitions/modules/accordion.js +++ b/src/definitions/modules/accordion.js @@ -63,7 +63,9 @@ $.fn.accordion = function(parameters) { initialize: function() { module.debug('Initializing', $module); module.bind.events(); - module.observeChanges(); + if(settings.observeChanges) { + module.observeChanges(); + } module.instantiate(); }, @@ -546,22 +548,24 @@ $.fn.accordion.settings = { verbose : false, performance : true, - on : 'click', + on : 'click', // event on title that opens accordion + + observeChanges : true, // whether accordion should automatically refresh on DOM insertion - exclusive : true, - collapsible : true, - closeNested : false, - animateChildren : true, + exclusive : true, // whether a single accordion content panel should be open at once + collapsible : true, // whether accordion content can be closed + closeNested : false, // whether nested content should be closed when a panel is closed + animateChildren : true, // whether children opacity should be animated - duration : 350, - easing : 'easeOutQuad', + duration : 350, // duration of animation + easing : 'easeOutQuad', // easing equation for animation - onOpening : function(){}, - onOpen : function(){}, - onClosing : function(){}, - onClose : function(){}, - onChange : function(){}, + onOpening : function(){}, // callback before open animation + onOpen : function(){}, // callback after open animation + onClosing : function(){}, // callback before closing animation + onClose : function(){}, // callback after closing animation + onChange : function(){}, // callback after closing or opening animation error: { method : 'The method you called is not defined'