Skip to content

Commit

Permalink
Sorting by text
Browse files Browse the repository at this point in the history
  • Loading branch information
MicaelCarvalho committed Nov 23, 2017
1 parent 5728684 commit 7a01b13
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js/djlu.js
Original file line number Diff line number Diff line change
Expand Up @@ -628,11 +628,11 @@ $(document).ready(function() {
Cookies.set("sort-state-" + tagGroup, currentSort);
tags.sort(function(a, b) {
if (currentSort == 0) {
var vA = $(a).text();
var vB = $(b).text();
var vA = $(a).data("tag").toLowerCase();
var vB = $(b).data("tag").toLowerCase();
} else if (currentSort == 1) {
var vA = $(b).text();
var vB = $(a).text();
var vA = $(b).data("tag").toLowerCase();
var vB = $(a).data("tag").toLowerCase();
} else {
var vA = +$(a).data("pos");
var vB = +$(b).data("pos");
Expand Down

0 comments on commit 7a01b13

Please sign in to comment.