File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
tcf_website/templates/search Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,21 @@ <h3 class="mr-3">Departments</h3>
167167
168168{% block js %}
169169 < script >
170+ document . addEventListener ( "DOMContentLoaded" , function ( ) {
171+ document . querySelectorAll ( ".hover-tcf-orange" ) . forEach ( header => {
172+ header . addEventListener ( "click" , function ( ) {
173+ let icon = this . querySelector ( "i.fas.fa-chevron-down, i.fas.fa-chevron-up" ) ;
174+ console . log ( "Icon found:" , icon ) ;
175+
176+ if ( icon ) {
177+ icon . classList . toggle ( "fa-chevron-down" ) ;
178+ icon . classList . toggle ( "fa-chevron-up" ) ;
179+ } else {
180+ console . warn ( "Icon not found." ) ;
181+ }
182+ } ) ;
183+ } ) ;
184+ } ) ;
170185 // Search results should display some content at all times
171186 // Thus the current open accordion will not be able to close itself
172187 $ ( '[data-toggle="collapse"]' ) . on ( 'click' , function ( e ) {
You can’t perform that action at this time.
0 commit comments