From fbafdae8ac5da1b4844323e28183750cc7fb86b4 Mon Sep 17 00:00:00 2001 From: jdwjdwjdw Date: Tue, 26 Mar 2024 17:44:40 +0000 Subject: [PATCH] Adjust js --- src/js/chem_h_subtheme.behaviors.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/js/chem_h_subtheme.behaviors.js b/src/js/chem_h_subtheme.behaviors.js index ddd2588..098bb4a 100644 --- a/src/js/chem_h_subtheme.behaviors.js +++ b/src/js/chem_h_subtheme.behaviors.js @@ -32,10 +32,11 @@ }); // Heading change for the halfpill title banner. - $('.chemh-wrapper--banner-halfpill-title h2').contents().unwrap().wrap('

'); - $('.chemh-wrapper--banner-halfpill-title h3').contents().unwrap().wrap('

'); - $('.chemh-wrapper--banner-halfpill-title h4').contents().unwrap().wrap('

'); - $('.chemh-wrapper--banner-halfpill-title .su-font-splash').contents().unwrap().wrap('

'); + const halfpillBannerHeadings = $('.chemh-wrapper--banner-halfpill-title h2, .chemh-wrapper--banner-halfpill-title h3, .chemh-wrapper--banner-halfpill-title h4, .chemh-wrapper--banner-halfpill-title .su-font-splash'); + + $(halfpillBannerHeadings).each(function(index, element) { + $(this).contents().unwrap().wrap('

'); + }); // Bckground color needed on only the Halfpill title banner. $('.chemh-wrapper--banner-halfpill-title').parents().find('.su-page-banner').addClass('su-page-banner--title');