// Script originally made by @zzseba78
// Using JQuery
var $ac = $('#accordion');
UIkit.accordion($ac, {
multiple: false,
collapsible: true,
duration: 300,
transition:"easeInOut"
});
$('a.uk-accordion-title').on('click', function() {
// Get the current index
var scrollEl = $(this);
// Scroll to element with timeout to let content show
setTimeout(function(){
var $scrolling = UIkit.scroll({ duration: 300, offset: 20 });
$scrolling.scrollTo(scrollEl);
}, 320);
});