19 lines
573 B
JavaScript
19 lines
573 B
JavaScript
|
|
||
|
$(function(){
|
||
|
$("#site-list").on( "click", ".accordion-title", function() {
|
||
|
var title = this
|
||
|
var content = $(this).closest('.accordion-item')
|
||
|
.find('.accordion-content')
|
||
|
if ($(content).is(':visible')) {
|
||
|
$(content).slideUp('fast')
|
||
|
$(this).closest('.accordion-item').removeClass('is-active')
|
||
|
$(title).attr('aria-expanded', false)
|
||
|
} else {
|
||
|
$(content).slideDown('fast')
|
||
|
$(this).closest('.accordion-item').addClass('is-active')
|
||
|
$(title).attr('aria-expanded', true)
|
||
|
}
|
||
|
return false;
|
||
|
});
|
||
|
})
|