From 55f3920de4f7652036cda0194f4947b2a175a264 Mon Sep 17 00:00:00 2001 From: Luke Albao Date: Thu, 10 Mar 2016 19:05:37 -0500 Subject: [PATCH] Fix #current styling for elements with same name --- brand/ohthejoy/footer.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brand/ohthejoy/footer.html.in b/brand/ohthejoy/footer.html.in index 123ecf0..b7e6e83 100644 --- a/brand/ohthejoy/footer.html.in +++ b/brand/ohthejoy/footer.html.in @@ -46,7 +46,7 @@ $(function() { $("#sidebar li>div").removeClass("current"); currSectionIdx = sectionIdx; if (currSectionIdx >= 0) { - var heading = $(sections[currSectionIdx]).text(); + var heading = $(sections[currSectionIdx]).attr('id'); var possibleAnchors = [ slugify(heading), // h1 or non-method h2 heading.replace(/ /g, '-'), // h2 method, just name or just endpoint