Skip to content

Commit

Permalink
Merge pull request #3018 from v-hclaveria/menus_overlap
Browse files Browse the repository at this point in the history
Adding script to handle menus
  • Loading branch information
claud-io authored Dec 22, 2023
2 parents 8a58437 + 68d3923 commit 95ea967
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion www/video/compare.php
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@
} else {
echo '<h2>Experiment Results</h2>';
echo '<div class="experiment_meta">';
echo '<div class="experiment_meta_included">';
echo '<div class="experiment_meta_included" id="experimentsAppliedSection">';
echo '<p>Experiments Applied:</p>';
echo '<ul>';
include __DIR__ . '/../experiments/list_applied.inc';
Expand Down Expand Up @@ -1452,6 +1452,17 @@ function drawCharts() {
?>
}
</script>
<script>
const experimentsAppliedContainer = document.querySelector("#experimentsAppliedSection");
const experimentsAppliedDetails = experimentsAppliedContainer.querySelectorAll('details');
Array.from(experimentsAppliedDetails).forEach((targetDetail) => {
targetDetail.addEventListener("click", () => {
experimentsAppliedDetails.forEach((detail) => {
if (detail !== targetDetail) { detail.removeAttribute("open"); }
});
});
});
</script>
<?php
if ($stickyFilmstrip) {
?>
Expand Down

0 comments on commit 95ea967

Please sign in to comment.