|
|
|
@ -42,6 +42,22 @@ $(document).on("ready turbolinks:load", function () { |
|
|
|
if ($.fn.footnotes) { |
|
|
|
if ($.fn.footnotes) { |
|
|
|
$('#documentTabContent').footnotes() |
|
|
|
$('#documentTabContent').footnotes() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(document).on('click', 'a[href="#footnotes"]', function(event){ |
|
|
|
|
|
|
|
$(this).each(function(){ |
|
|
|
|
|
|
|
var a, b, c, d; |
|
|
|
|
|
|
|
a = $(this), b = a.attr('href'), c = a.text(), d = '#footnote' + c |
|
|
|
|
|
|
|
a.attr('href', d), a.attr('id', 'fn' + c) |
|
|
|
|
|
|
|
a.trigger('click') |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
event.preventDefault(); |
|
|
|
|
|
|
|
}).on('click', 'a[href^="#footnote"], a[href^="#fn"]', function(event){ |
|
|
|
|
|
|
|
var a, b; |
|
|
|
|
|
|
|
a = $(this), b = $(a.attr('href')) |
|
|
|
|
|
|
|
if(b.length<=0)return |
|
|
|
|
|
|
|
event.preventDefault() |
|
|
|
|
|
|
|
$('html, body, .tab-content').animate({ scrollTop: b.offset().top }, 700, 'linear') |
|
|
|
|
|
|
|
}) |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
import "channels" |
|
|
|
import "channels" |
|
|
|
|