@@ -225,25 +225,19 @@ class HeadingAnchors extends HTMLElement {
225225HeadingAnchors . register ( ) ;
226226
227227export { HeadingAnchors }
228- document . addEventListener ( "DOMContentLoaded" , function ( ) {
229- const allElements = document . querySelectorAll (
230- 'main h1, main h2, main h3, main h4, main h5, main h6, main p, main li, main .card'
231- ) ;
232-
233- let staggerIndex = 0 ;
234-
235- allElements . forEach ( ( el ) => {
236- if ( el . classList . contains ( "card" ) ) {
237- el . classList . add ( "appear" ) ;
238- el . style . animationDelay = `${ staggerIndex * 150 } ms` ;
239- el . style . animationDuration = "800ms" ;
240- staggerIndex ++ ;
241- }
242- else if ( ! el . closest ( '.card' ) ) {
243- el . classList . add ( "appear" ) ;
244- el . style . animationDelay = `${ staggerIndex * 150 } ms` ;
245- el . style . animationDuration = "800ms" ;
246- staggerIndex ++ ;
247- }
248- } ) ;
249- } ) ;
228+ document . addEventListener ( "DOMContentLoaded" , ( ) => {
229+ const allElements = document . querySelectorAll (
230+ "main h1, main h2, main h3, main h4, main h5, main h6, main p, main li, main .card" ,
231+ ) ;
232+
233+ let staggerIndex = 0 ;
234+
235+ allElements . forEach ( ( el ) => {
236+ if ( el . classList . contains ( "card" ) || ! el . closest ( ".card" ) ) {
237+ el . classList . add ( "appear" ) ;
238+ el . style . animationDelay = `${ staggerIndex * 150 } ms` ;
239+ el . style . animationDuration = "800ms" ;
240+ staggerIndex ++ ;
241+ }
242+ } ) ;
243+ } ) ;
0 commit comments