docs: Add hover over links on headings
This commit is contained in:
parent
1e7dc06ab8
commit
8a771450d2
4 changed files with 33 additions and 2 deletions
14
docs/static/js/custom.js
vendored
Normal file
14
docs/static/js/custom.js
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
// Site JS
|
||||
|
||||
// Add hover links on headings
|
||||
$(function() {
|
||||
return $("h2, h3, h4, h5, h6").each(function(i, el) {
|
||||
var $el, icon, id;
|
||||
$el = $(el);
|
||||
id = $el.attr('id');
|
||||
icon = '<i class="fa fa-link"></i>';
|
||||
if (id) {
|
||||
return $el.prepend($("<a />").addClass("header-link").attr("href", "#" + id).html(icon));
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue