Skip to content
Snippets Groups Projects
Commit 5c995fcd authored by Danae Savvidi's avatar Danae Savvidi :laughing:
Browse files

Merge branch '121-save-toggling-on-job-offers-page-for-students' into 'dev'

Draft: Resolve "Save toggling on Job Offers Page for Students"

Closes #121

See merge request !341
parents 0b54ccf8 571486f1
No related branches found
No related tags found
No related merge requests found
Pipeline #965780 failed
......@@ -235,6 +235,25 @@
</div>
<script th:inline="text">
$(document).ready(function () {
$('button').on('click', function () {
let accordionId = $(this).attr('aria-controls');
let isExpanded = $(this).attr('aria-expanded');
console.log("(click) change state of "+accordionId+" to " + isExpanded);
localStorage.setItem(accordionId, isExpanded);
});
$('[class="accordion__content"]').each(function () {
let accordionId = $(this).attr('id');
let isExpanded = localStorage.getItem(accordionId);
if (isExpanded !== null) {
console.log("update state of "+accordionId+" to " + isExpanded);
$('tbody[id="' + accordionId + '"]').attr('aria-expanded', isExpanded);
$('button[aria-controls="' + accordionId + '"]').attr('aria-expanded', isExpanded);
}
});
});
$(() => {
$("#program-select").change(function () {
let url = new URL(window.location);
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment