AlexShevyakov
AlexShevyakov

Reputation: 423

Accordion adjusting height of the panels in jquery

I am trying to stop autoresize accordion panel by using this script

$( "#fullpageaccordion .questions" ).accordion({autoHeight: false});

which does not work - accordion adjust the content area size by its largest content. What I am doing wrong? Thanks in advance.

Upvotes: 0

Views: 55

Answers (2)

Alex Gill
Alex Gill

Reputation: 2491

Try this...

$('#accordion').accordion({
   collapsible: true,
   autoHeight: false
});

Or try this to clear height...

$('#accordion').accordion({ 
   clearStyle: true 
});

Note: autoHeight doesnt work with clearStyle

Upvotes: 1

Bhavik
Bhavik

Reputation: 4904

In jQuery 1.9.0
$( "#fullpageaccordion .questions" ).accordion({heightStyle: "content"});
In jQuery 1.8.2
You are correct--
$( "#fullpageaccordion .questions" ).accordion({autoHeight: false});
Reference

Upvotes: 1

Related Questions