From 7a01b1390ae1931ef092db3a001382b4c786027d Mon Sep 17 00:00:00 2001 From: Micael Carvalho Date: Thu, 23 Nov 2017 15:16:57 +0100 Subject: [PATCH] Sorting by text --- js/djlu.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/djlu.js b/js/djlu.js index f47087e..e39c80f 100644 --- a/js/djlu.js +++ b/js/djlu.js @@ -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");