In my UI I have an accordion setup like this:
Section 1
...content...
//
Use heightStyle option to control the height of the accordion and each panel.
$("#accordion").accordion({
heightStyle: "content"
});
Possible values: