diff --git a/collapsibleTabs.js b/collapsibleTabs.js index 6fd8c496b..da860ca10 100644 --- a/collapsibleTabs.js +++ b/collapsibleTabs.js @@ -14,8 +14,7 @@ this.each( function () { var $el = $( this ); // add the element to our array of collapsible managers - $.collapsibleTabs.instances = ( $.collapsibleTabs.instances.length === 0 ? - $el : $.collapsibleTabs.instances.add( $el ) ); + $.collapsibleTabs.instances = $.collapsibleTabs.instances.add( $el ); // attach the settings to the elements $el.data( 'collapsibleTabsSettings', settings ); // attach data to our collapsible elements @@ -37,7 +36,7 @@ return this; }; $.collapsibleTabs = { - instances: [], + instances: $( [] ), boundEvent: null, defaults: { expandedContainer: '#p-views ul',