Getting even closer, testing even more

This commit is contained in:
Falkvinge
2017-03-16 11:17:05 +01:00
parent b83b325b86
commit 678d7db297
+6 -3
View File
@@ -95,7 +95,7 @@ function updateListBox(box, listData) {
// remove items that aren't in list, build id array
var idBoxLookup = {};
var listContainer = $($(box).parent).parent;
var listContainer = $(box).parent().parent();
console.log($(box));
console.log(listContainer);
var listElements = $(box).children;
@@ -109,11 +109,14 @@ function updateListBox(box, listData) {
// Step 4: Adjust visibility as required
console.log(listData.length);
console.log(listData.length == 0);
if (!boxVisible && listData.length > 0) {
$(listContainer).fadeIn();
listContainer.fadeIn();
}
else if (boxVisible && listData.length == 0) {
$(listContainer).fadeOut();
$listContainer.fadeOut();
}
}