-
Notifications
You must be signed in to change notification settings - Fork 10
/
af_gallery.js
37 lines (33 loc) · 1.07 KB
/
af_gallery.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
function af_gallery_hideAll(results_div) {
var results = document.getElementById(results_div);
var element = results.getElementsByTagName("article");
for (i = 1; i < element.length; i++) {
element[i].style.display = "none";
}
}
function af_gallery_show(results_div, hash) {
var results = document.getElementById(results_div);
var element = results.getElementsByTagName("article");
for (i = 0; i < element.length; i++) {
if (hash === element[i].id) {
element[i].style.display = ""
} else {
element[i].style.display = "none";
}
}
}
// function filter() {
// var input, filter, ul, li, a, i;
// input = document.getElementById("filter");
// filter = input.value.toUpperCase();
// div = document.getElementById("dropdown");
// element = div.getElementsByTagName("a");
// for (i = 0; i < element.length; i++) {
// textValue = element[i].textContent || element[i].innerText;
// if (textValue.toUpperCase().indexOf(filter) > -1) {
// element[i].style.display = "";
// } else {
// element[i].style.display = "none";
// }
// }
// }