I am attempting to create a layout with two Divs side by side, each containing slightly different content. I have successfully resized them equally using JavaScript, but the issue arises when loading the collapsed content as it does not adjust to the new size.
Here is my attempt:
HTML:
<div class="row">
<div class="col-md-6">
<div class="col-content">
<div id="accordion" class="panel-group">
<div class="panel panel-default">
<div class="panel-heading">
<h4>BOX 1</h4>
</div>
<div id="collapseOne" class="panel-collapse collapse in">
<div class="panel-body">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis
aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
<a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo">more...</a>
</div>
</div>
</div>
<div class="panel panel-default">
<div id="collapseTwo" class="panel-collapse collapse">
<div class="panel-body background-solid">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nor...
<p>JS:</p>
<pre><code> var heightTallest = Math.max.apply(null, $(".col-content").map(function ()
{
return $(this).outerHeight();
}).get());
$('.col-content').css({ height: heightTallest + 'px' });
CSS:
.col-content {
overflow: hidden;
border-style: solid;
border-color: rgba(5, 47, 90, 0.8);
border-width: medium;
border-radius: 5px;
padding: 0 15px;
max-height: auto;
}