mirror of
https://github.com/gsi-upm/sitc
synced 2024-11-18 04:22:28 +00:00
14 lines
384 B
JavaScript
14 lines
384 B
JavaScript
// http://ben.balter.com/2014/03/13/pages-anchor-links/
|
|
|
|
$(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" style="font-size: 0.8em"></i>';
|
|
if (id) {
|
|
return $el.append($("<a />").addClass("header-link").attr("href", "#" + id).html(icon));
|
|
}
|
|
});
|
|
});
|