Documentation: Fix for Firefox, Find in table of contents panel

This commit is contained in:
Yuriy Artamonov 2013-02-27 11:21:40 +00:00
parent 2616b9d6e3
commit ef3914dac4

View File

@ -63,12 +63,15 @@
$(this).removeClass('toc-search-result'); $(this).removeClass('toc-search-result');
$(this).removeClass('toc-search-hidden'); $(this).removeClass('toc-search-hidden');
} else { } else {
if (this.innerText.toLowerCase().indexOf(searchQuery.toLowerCase()) >= 0) { var innerText = $(this).text();
$(this).addClass('toc-search-result'); if (innerText) {
$(this).removeClass('toc-search-hidden'); if (innerText.toLowerCase().indexOf(searchQuery.toLowerCase()) >= 0) {
} else { $(this).addClass('toc-search-result');
$(this).addClass('toc-search-hidden'); $(this).removeClass('toc-search-hidden');
$(this).removeClass('toc-search-result'); } else {
$(this).addClass('toc-search-hidden');
$(this).removeClass('toc-search-result');
}
} }
} }
}); });