I'm trying to build in a button to expand a list in a list of div elements.
$('.expandAllfixVersionList').click(function () {
$('.fixVersionList').find('.issue').animate({height: $('.fixVersionList').children('.version')[0].scrollHeight}, 500);
$('.fixVersionList').find('.issue').animate({'overflow': 'visible'}, 500);
});
Here I got the problem that he shows the first fixVersionListElement
correct and all folowing get the same height, even if they got more or less Issues in them. So they might get cut off or be way to big. Can I make this in a way that he addresses the animation dynamic to the correct height?
The structure of the HTML is like this:
<div class="content">
<div class="fixVersionList">...</div>
...
<div class="fixVersionList">
<ul class="issue">
<li>
</li>
</ul>
<ul class="issue">...</ul>
...
</div>
</div>