You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
504 B
27 lines
504 B
$(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');
|
|
}
|
|
});
|
|
|
|
});
|