This commit is contained in:
Tim Wijma
2022-11-03 15:54:23 +01:00
parent 8143421190
commit 25254cd2fc
6 changed files with 51 additions and 21 deletions

View File

@@ -38,15 +38,6 @@ $(window).on("load", function() {
showFeeds()
})
$(".sortby").on("click", function() {
$(".sort-dropdown").toggle()
// $(".sort-btn").toggleClass("radius-bottom")
})
$(".sort-dropdown-list li").on("click", function() {
$(".sort-dropdown").toggle()
})
let root = document.querySelector(":root")
$(".logo").on("click", function() {
@@ -87,6 +78,19 @@ $(window).on("filter", function() {
}
})
$(".current-sort").on("click", function() {
$(".sort-dropdown-list li:not(:first-of-type)").toggle()
})
$(".sort-btn").on("click", function() {
$(".sort-dropdown-list li:not(:first-of-type)").toggle()
})
$(".sort-dropdown-list li:not(:first-of-type)").on("click", function() {
$(".sort-dropdown-list li:not(:first-of-type)").toggle()
$(".current-sort").html($(this).html())
})
$(".order-btn").on("click", function() {
if($(this).html() == "arrow_downward") { // Descending to ascending