21 lines
668 B
JavaScript
21 lines
668 B
JavaScript
$(document).ready(function () {
|
|
function fixedHeaderOffset(hash) {
|
|
$('html, body').animate({
|
|
scrollTop: $(hash).offset().top - 71
|
|
}, 'fast');
|
|
}
|
|
var hash = location.hash;
|
|
if(hash !== '' && hash !== 'undefined') {
|
|
fixedHeaderOffset(hash);
|
|
}
|
|
|
|
$('.description a, .description td, .description div').on('click', function(){
|
|
var hashID = '#' + $(this).attr('id');
|
|
if(hashID !== '#' && hashID !== '#undefined') {
|
|
fixedHeaderOffset(hashID);
|
|
}
|
|
});
|
|
$(".spoiler_heading").on("click", function () {
|
|
$(this).next(".spoiler_code").slideToggle("fast");
|
|
});
|
|
}); |