mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-24 10:22:23 +00:00
edit content h1 title
This commit is contained in:
parent
570fa0e223
commit
0d052ac49e
@ -108,13 +108,14 @@ function create_page_anchors() {
|
||||
// if there is a match, create click listeners
|
||||
// and scroll to relevant sections
|
||||
|
||||
// go through header level 2 and 3
|
||||
for (var i = 2; i <= 4; i++) {
|
||||
// go through header level 1 to 3
|
||||
for (var i = 1; i <= 4; i++) {
|
||||
// parse all headers
|
||||
var headers = [];
|
||||
$('#content h' + i).map(function() {
|
||||
headers.push($(this).text());
|
||||
$(this).addClass(replace_symbols($(this).text()));
|
||||
this.id = 'h'+1+'-'+replace_symbols($(this).text();
|
||||
});
|
||||
|
||||
// parse and set links between li and h2
|
||||
|
Loading…
x
Reference in New Issue
Block a user