uses custom jquery to handle accordion

This commit is contained in:
buttle 2021-11-24 11:02:30 +01:00
parent efa9584e9c
commit 6af87367eb
3 changed files with 20 additions and 13 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,13 @@
(function($) {
$(document).ready(function() { $(function(){
$('._expand_site_item').click(function() { $("#site-list").on( "click", ".accordion-title", function() {
$(this).next('tr').toggle(); var content = $(this).closest('.accordion-item')
return false; .find('.accordion-content')
}); if ($(content).is(':visible')) {
}); $(content).slideUp('fast')
})(jQuery) } else {
$(content).slideDown('fast')
}
return false;
});
})

View File

@ -21,11 +21,13 @@ $collections = htmlentities(json_encode($collections, JSON_HEX_QUOT), ENT_QUOTES
//$collections = json_encode($collections); //$collections = json_encode($collections);
?> ?>
<div data-vue-component="archive-list" <div id="site-list">
data-collections='<?= $collections ?>' <div
data-page_size=3> data-vue-component="archive-list"
data-collections='<?= $collections ?>'
data-page_size=3>
</div>
</div> </div>
<script src="/themes/archive/asset/js/archive-list.js"></script> <script src="/themes/archive/asset/js/archive-list.js"></script>