Skip to content

Commit 7d687a2

Browse files
committed
Fix tooltips on license pages
1 parent c973974 commit 7d687a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

assets/js/app.coffee

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ class Choosealicense
4040
# Dynamically add annotations as title attribute to rule list items
4141
for ruletype, rules of window.annotations
4242
for rule in rules
43-
# Only select license elements in table, not legend
44-
licenseLiElement = $("td.license-#{ruletype} .#{rule["tag"]}")
43+
# Exclude license elements in the legend
44+
licenseLiElement = $(".license-#{ruletype} .#{rule["tag"]}").not("dd.license-#{ruletype} .#{rule["tag"]}")
4545
tooltipAttr = @tooltipAttributesMapperByRuleType[ruletype]
4646
licenseLiElement.attr "aria-label", "#{tooltipAttr.heading}: #{rule.description}"
4747
licenseLiElement.addClass("hint--bottom

0 commit comments

Comments
 (0)