What I am looking for is to have only one specific div in my accordion (device properties) change its height based on the content. I have also noticed that if I use Firebug to remove the height property of the device div, it adjusts the height correctly.
This is how I initiated my accordion:
$('#accordion').accordion({heightStyle: 'auto'});
I have tried:
$('#accordion').accordion({heightStyle: "fill"});
$( "#accordion" ).accordion( "refresh" );
and
$('#accordion').accordion({heightStyle: "content"});
$( "#accordion" ).accordion( "refresh" );
What I require:
An HTML example (to provide some context)
<div id="application" style="position:absolute">
<div id="accordion" class="ui-accordion ui-widget ui-helper-reset" role="tablist">
<h3 id="clickTexts" class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-accordion-icons" role="tab" aria-controls="ui-accordion-accordion-panel-5" aria-selected="false" tabindex="-1">
<span class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span>
Texts
</h3>
<div id="ui-accordion-accordion-panel-5" class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" style="overflow: auto; display: none; height: 246px;" aria-labelledby="clickTexts" role="tabpanel" aria-expanded="false" aria-hidden="true">
<span class="ui-helper-hidden-accessible" role="status" aria-live="polite"></span>
<input id="texts_ac" class="ui-autocomplete-input" type="text" onclick="this.value='';" autocomplete="off">
</div>
<h3 id="clickDevp" class="ui-accordion-header ui-helper-reset ui-state-default ui-accordion-icons ui-accordion-header-active ui-state-active ui-corner-top" role="tab" aria-controls="device" aria-selected="true" tabindex="0">
<span class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-s"></span>
Device properties
</h3>
<div id="device" class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active" style="width: 278px; display: block; height: 246px;" aria-labelledby="clickDevp" role="tabpanel" aria-expanded="true" aria-hidden="false">
ID:
<input id="devID" type="text" style="float:right">
<hr>
<p id="devType">Type: BLOK6-097</p>
<hr>
<p>
<hr>
<p>Positions</p>
<div id="posTable">
<table border="1px" style="width:100%">
<tbody>
<tr>
<td>1</td>
<td>NORMAAL</td>
<td>X: Y:</td>
</tr>
...additional table rows...