mirror of
https://github.com/TheGreyDiamond/Enlight.git
synced 2025-07-17 20:33:48 +02:00
27 lines
504 B
JavaScript
27 lines
504 B
JavaScript
$(function() {
|
|
|
|
var
|
|
toc = $('#toc').show(),
|
|
items = $('#toc > ul').hide();
|
|
|
|
$('#toc h3')
|
|
.click(function() {
|
|
if (items.is(':visible')) {
|
|
items.animate({
|
|
height: 'hide',
|
|
opacity: 'hide'
|
|
}, 300, function() {
|
|
toc.removeClass('expandedtoc');
|
|
});
|
|
}
|
|
else {
|
|
items.animate({
|
|
height: 'show',
|
|
opacity: 'show'
|
|
}, 400);
|
|
toc.addClass('expandedtoc');
|
|
}
|
|
});
|
|
|
|
});
|