I have a page set up nicely (JSFiddle) with a photo and expanding bio when you click the persons name (e.g. "Jane Doe"). I'm using an equal heights plugin to keeps the columns to match each other, e.g.
<span class="views-bio-left equal-title" style="height: 180px; overflow: auto;">
content
</span>
<span class="views-bio-right equal-title" style="height: 180px; overflow: auto;">
content
</span>
So far I've got the expanding part working and the equal heights part working when the page loads. However when you click the person's name, all of the people's bio's expand when I'd like only the one associated with each person at a time.
Example of text in question for each person that gets expanded is:
<span class="field-group-format-wrapper" style="display: none;">
<p>Ad antehabeo autem consequat fere jus letalis nisl patria tego. Ad aptent esse eum fere ibidem iusto pecus.</p>
</span>
I'm using this code for that:
// Equal heights for expanded text.
// This one expands all hidden text spans, not just the indivudial span being expanded
$(window).click(function () {
$(".field-group-format-toggler-abstract").each(function () {
$(".equal-title").css('height','auto').equalHeights();
});
});
I figured using .each(function ()
would help focus on only expanding the associated hidden text and not all of them on the page but that's not the case so I am at a loss.