0

jquery accordion should open while page loading. after page loading complete accordion should compact automatically.

jQuery().ready(function(){
jQuery('#portslid').accordion({
collapsible: true,
autoheight: false,  
alwaysOpen: false,
active: false,
animated: "bounceslide"
//animated: 'easeslide'
});     
});

1 Answers1

2

If you want the accordion to be open at page load you should change the active option to the element that you want to be open :

jQuery().ready(function(){
jQuery('#portslid').accordion({
collapsible: true,
autoheight: false,  
alwaysOpen: false,
active: 1,
animated: "bounceslide"
//animated: 'easeslide'
});     
});

And then at the load you close it :

jQuery(window).load(function(){
    jQuery('#portslid').accordion({active: false});     
    });

EDIT : The jquery accordeon does not support to be all open , but there's work around like here : jQuery Accordion expand all div

Community
  • 1
  • 1
GregM
  • 2,634
  • 3
  • 22
  • 37