Skip to content

Commit 4d966ab

Browse files
committed
Update glossary search functionality
1 parent 4370cdd commit 4d966ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

resources/js/functions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ $(document).ready(function() {
427427
const DocsPreferences = Storage('org.scala-lang.docs.preferences');
428428
const Scala3 = 'scala-3';
429429
const scalaVersion = DocsPreferences.getPreference('scalaVersion', Scala3);
430-
430+
431431
function activateTab(tabs, scalaVersion) {
432432
// click the code tab corresponding to the preferred Scala version.
433433
tabs.find('input[data-target=' + scalaVersion + ']').prop("checked", true);
@@ -537,7 +537,7 @@ $('#filter-glossary-terms').focus();
537537
// Loop through the comment list
538538
$(".glossary .toc-context > ul li").each(function(){
539539
// If the name of the glossary term does not contain the text phrase fade it out
540-
if (jQuery(this).find("h4").text().search(new RegExp(filter, "i")) < 0) {
540+
if (jQuery(this).find("h3").text().search(new RegExp(filter, "i")) < 0) {
541541
$(this).fadeOut();
542542

543543
// Show the list item if the phrase matches and increase the count by 1

0 commit comments

Comments
 (0)