When sorting divs by multiple data attributes how to specify ASC / DESC?
问题 In this question - How to sort divs by 2 data attributes? this helpful answer is working well for me. However I need to be able to specify whether each attribute is ASC or DESC How would I modify the js to enable this please? I am thinking something like this: divList.sort(multiSort(["status","ASC","order","DESC"])); But I don't know where to begin with making the JS look at every second item in the array and then adjusting the sort order accordingly. $(document.body).on('click', "#sortthem",