@@ -367,11 +367,11 @@ window.viewEventDetails = function(eventIndex, expandDetails = false) {
367367
368368 // Automatically expand details if requested
369369 if ( expandDetails ) {
370- // Wait for the info window to render, then check the checkbox
370+ // Wait for the info window to render, then open the details
371371 setTimeout ( ( ) => {
372- const detailsCheckbox = document . getElementById ( 'moreInfo ') ;
373- if ( detailsCheckbox && ! detailsCheckbox . checked ) {
374- detailsCheckbox . checked = true ;
372+ const detailsElement = document . querySelector ( '.info-body details ') ;
373+ if ( detailsElement && ! detailsElement . open ) {
374+ detailsElement . open = true ;
375375 // Trigger the reposition
376376 infoWindow . open ( window . map , event . marker ) ;
377377 }
@@ -502,15 +502,16 @@ class Events {
502502 <p class="categories">Categories: ${ event . categories . map ( category => `<a onclick="filter({category:'${ category } '})">${ category } </a>` ) . join ( '' ) } </p>
503503 </div>
504504 <div class="info-body">
505- <input id="moreInfo" type="checkbox" onchange=>
506- <label for="moreInfo">+ Expand Details +</label>
507- <div id="details">
508- ${ event . details }
509- </div>
505+ <details>
506+ <summary>+ Expand Details +</summary>
507+ <div id="details">
508+ ${ event . details }
509+ </div>
510+ </details>
510511 </div>
511512 `
512513 // Reposition after expanding
513- content . querySelector ( 'input ' ) . addEventListener ( 'change ' , ( ) => {
514+ content . querySelector ( 'details ' ) . addEventListener ( 'toggle ' , ( ) => {
514515 this . cachedInfoWindow . open ( window . map , event . marker ) ;
515516 } )
516517 this . cachedInfoWindow . setContent ( content ) ;
0 commit comments