File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,11 @@ document.addEventListener('DOMContentLoaded', function () {
1212 a . classList . add ( 'banner-link' )
1313 } )
1414
15+ // add a class to the link itself for tracking
16+ document . querySelectorAll ( '.cards .link a' ) . forEach ( function ( a ) {
17+ a . classList . add ( 'card-link' )
18+ } )
19+
1520 // if a card is 'selectable' then make it a click target
1621 // by taking the link from the card and wrapping the whole card in an anchor tag with that link
1722 // if the card contains more than one link, the first link is used
@@ -30,11 +35,6 @@ document.addEventListener('DOMContentLoaded', function () {
3035 e . preventDefault ( )
3136 window . location . href = target
3237 } )
33-
34- // add a class to the link itself for tracking
35- link . querySelectorAll ( 'a' ) . forEach ( function ( a ) {
36- a . classList . add ( 'card-link' )
37- } )
3838 } )
3939 }
4040
You can’t perform that action at this time.
0 commit comments