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');