diff --git a/index.php b/index.php index f1f1194..370662b 100644 --- a/index.php +++ b/index.php @@ -45,7 +45,12 @@ $("#sort").click(function(){ $('.book').sortElements(function(a, b){ - return $(a).find ("." + $("#sortchoice").val()).text() > $(b).find ("." + $("#sortchoice").val()).text() ? 1 : -1; + var test = 1; + if ($("#sortorder").val() == "desc") + { + test = -1; + } + return $(a).find ("." + $("#sortchoice").val()).text() > $(b).find ("." + $("#sortchoice").val()).text() ? test : -test; }); $("#search").slideUp(); }); @@ -105,11 +110,15 @@
- + + Sort
diff --git a/style.css b/style.css index 455099a..aec38d9 100644 --- a/style.css +++ b/style.css @@ -220,12 +220,6 @@ vertical-align: middle; width: 242px; } -.search select -{ -width: 248px; -} - - .bookpopup { min-width: 400px;