From c2d41ca6fda054ddd135dae68efe468bb522b627 Mon Sep 17 00:00:00 2001 From: "Bradley M. Kuhn" Date: Wed, 25 Nov 2020 19:42:57 -0800 Subject: [PATCH] Remove active class addition; don't remove data attr, only expand a --- www/conservancy/static/js/supporter-page.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/www/conservancy/static/js/supporter-page.js b/www/conservancy/static/js/supporter-page.js index 543a62f7..5e5f4e18 100644 --- a/www/conservancy/static/js/supporter-page.js +++ b/www/conservancy/static/js/supporter-page.js @@ -131,12 +131,10 @@ $(document).ready(function() { $('a[data-expand-link-text]').each(function(index, element) { var $element = $(element); $element.append($element.data('expand-link-text')); - $element.removeAttr('data-expand-link-text'); }); $('.expandable-section').each(function(index) { - var $expandlink = $(this).children('.expander'); + var $expandlink = $(this).children('a.expander'); var $ourexpandablesection = $(this); - $expandlink.addClass('active').trigger('click'); $expandlink.on('click', function(event) { $expandlink.fadeOut('slow'); $ourexpandablesection.find('.read-more').each(function(index) { $(this).click(); }); });