diff --git a/javascript/ToggleCompositeField.js b/javascript/ToggleCompositeField.js index a7ddbbaa1..d853bfbee 100644 --- a/javascript/ToggleCompositeField.js +++ b/javascript/ToggleCompositeField.js @@ -2,10 +2,10 @@ $.entwine('ss', function($){ $('.ss-toggle').entwine({ onadd: function() { - opts = {collapsible: true}; - if (this.hasClass("ss-toggle-start-closed")) opts.active = false; - - this.accordion({ collapsible: true }); + this.accordion({ + collapsible: true, + active: !this.hasClass("ss-toggle-start-closed") + }); this._super(); },