Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Project: TechnoCloud
Views: 44
1
$(function() {
2
$("#search input").keyup(function() {
3
var srch = $(this).val().toLowerCase();
4
$('#toc li').each(function() {
5
var self = $(this);
6
if (self.find('a').text().toLowerCase().indexOf(srch) != -1) {
7
self.show();
8
} else {
9
self.hide();
10
}
11
});
12
$('#toc .container').show();
13
$('#toc ul').each(function() {
14
var self = $(this);
15
if (self.find('li:visible').length == 0) {
16
self.closest('.container').hide();
17
}
18
});
19
if ($('#toc .container:visible').length == 0) {
20
$("#notfound").show();
21
} else {
22
$("#notfound").hide();
23
}
24
});
25
$("#search input").val('').trigger('keyup');
26
$('.ui.embed').embed();
27
});
28