remove social links from headings other than h1 and h2

Change-Id: I4da59eab7c548324c738f32dbe902d27a4bc3462
This commit is contained in:
Jim Phillips 2015-06-24 14:37:12 -04:00
parent a6b3443d63
commit 68df595017
1 changed files with 6 additions and 1 deletions

View File

@ -182,7 +182,12 @@ $(document).ready(function () {
});
$('.headerlink').each(function () {
$(this).replaceWith(generateLinks($(this).attr('href'), $(this).parent().children('.toc-backref').text()));
var parentTag = $( this ).parent().get( 0 ).tagName;
if(parentTag == 'H1' || parentTag == 'H2'){
$(this).replaceWith(generateLinks($(this).attr('href'), $(this).parent().children('.toc-backref').text()));
} else {
$(this).empty();
}
});
$('[data-toggle="tooltip"]').tooltip();