mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-24 18:32:22 +00:00
add content_toc
This commit is contained in:
parent
a7b036d703
commit
420c1aa863
@ -90,7 +90,6 @@ function li_create_linkage(li_tag, header_level) {
|
||||
var header = $(
|
||||
ditto.content_id + " h" + header_level + "." + li_tag.attr("id")
|
||||
);
|
||||
console.log(header);
|
||||
$('html, body').animate({
|
||||
scrollTop: header.offset().top
|
||||
}, 200);
|
||||
@ -126,8 +125,8 @@ function create_page_anchors() {
|
||||
.attr('id','content-toc');
|
||||
for (var j = 0; j < headers.length; j++) {
|
||||
var li_tag = $('<li></li>').text(headers[j]);
|
||||
li_create_linkage(li_tag, i);
|
||||
ul_tag.append(li_tag);
|
||||
li_create_linkage(li_tag, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user