This commit is contained in:
Marc Beninca 2020-04-11 11:30:43 +02:00
parent ea61561a33
commit 859646835e
38 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,30 @@
jQuery.fn.justtext = function() {
return $(this).clone()
.children()
.remove()
.end()
.text();
};
$(document).ready(function(){
$("h1").each(function(){
$("#sidebar").append(
"<li class=\"nav-header\"><h4>"+$(this).children()[0].justtext()+"</h4></li>"
);
ul = $("<ul>");
$("h2",$(this).parent().parent()).each(function(){
ul.append(
"<li class=\"nav-header\"><h5>"+$(this).justtext()+"</h5></li>"
);
subul = $("<ul>");
$("h3",$(this).parent()).each(function(){
subul.append(
"<li class=\"nav-header\"><h6>"+$(this).justtext()+"</h6></li>"
);
});
ul.append(subul);
});
$("#sidebar").append(ul);
});
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long