Update 2 column author list view

This commit is contained in:
Ozzieisaacs
2019-03-26 17:54:12 +01:00
parent 772f978b45
commit dc93222579
2 changed files with 22 additions and 2 deletions
+18 -2
View File
@@ -22,8 +22,17 @@ $("#desc").click(function() {
return;
}
var list = $('#list');
var second = $('#second');
var listItems = list.children(".row");
list.append(listItems.get().reverse());
var reversed, elementLength, middle;
Array.prototype.push.apply(listItems,second.children(".row"))
reversed = listItems.get().reverse();
elementLength = reversed.length;
middle = parseInt(elementLength / 2) + (elementLength % 2);
list.append(reversed.slice(0, middle));
second.append(reversed.slice(middle,elementLength));
direction = 0;
});
@@ -33,8 +42,15 @@ $("#asc").click(function() {
return;
}
var list = $("#list");
var second = $('#second');
var listItems = list.children(".row");
list.append(listItems.get().reverse());
Array.prototype.push.apply(listItems,second.children(".row"));
reversed = listItems.get().reverse();
elementLength = reversed.length;
middle = parseInt(elementLength / 2) + (elementLength % 2);
list.append(reversed.slice(0, middle));
second.append(reversed.slice(middle,elementLength));
direction = 1;
});