Remove nesting of hidden sections on sustainer page

This makes the page more similar to how it has worked in previous years.
This commit is contained in:
Ben Sturmfels 2023-11-23 14:34:56 +11:00
parent 867d4f4e82
commit 37c9f0f282
Signed by: bsturmfels
GPG key ID: 023C05E2C9C068F0
2 changed files with 1 additions and 12 deletions

View file

@ -163,17 +163,6 @@ $(document).ready(function() {
$expandlink.on('click', function(event) { $expandlink.on('click', function(event) {
$expandlink.fadeOut('slow'); $expandlink.fadeOut('slow');
$ourexpandablesection.find('.read-more').each(function(index) { $(this).click(); }); $ourexpandablesection.find('.read-more').each(function(index) { $(this).click(); });
// Don't laugh. I'm running this twice because the expandable
// sections are hidden by actually their text from the DOM and
// storing it in a closure, to be reinstated later. That means when
// the above ".find('.read-more')" runs it only finds the one
// top-level .read-more element because the children have been
// temporarily removed from the page. After this top-level element
// has been clicked to restore it's body, we can run this again and
// .find() the children elements. I suspect this may have worked in
// the past if there were multiple sections all at the top-level,
// rather than being nested under "Our Year in Review".
$ourexpandablesection.find('.read-more').each(function(index) { $(this).click(); });
}); });
}); });
}); });

View file

@ -131,6 +131,7 @@ account will be approved.</p>
<div class="picture-small right"> <div class="picture-small right">
<a href="https://sfconservancy.org/videos/sfc-introduction_1080p.mp4"><img src="https://sfconservancy.org/videos/sfc-introduction-video_poster.jpg" alt="Thumbnail of video showing a tree and Software Freedom" /></a> <a href="https://sfconservancy.org/videos/sfc-introduction_1080p.mp4"><img src="https://sfconservancy.org/videos/sfc-introduction-video_poster.jpg" alt="Thumbnail of video showing a tree and Software Freedom" /></a>
</div> </div>
</div>
<h3 id="NewStaff">New staff!</h3> <h3 id="NewStaff">New staff!</h3>
@ -284,7 +285,6 @@ reach for reproducibility. </p>
</div> </div>
<a class="expander" data-expand-link-text="(Expand All Sections)"></a> <a class="expander" data-expand-link-text="(Expand All Sections)"></a>
</div> </div>
</div>
<div class="donate-sidebar"> <div class="donate-sidebar">
<details> <details>