Remove active class addition; don't remove data attr, only expand a

This commit is contained in:
Bradley M. Kuhn 2020-11-25 19:42:57 -08:00
parent 2842d416a5
commit c2d41ca6fd

View file

@ -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(); }); });