Skip to main content
The 2025 Developer Survey results are in. Explore insights into technology and tools, careers, community and more. View results.

All Questions

Filter by
Sorted by
Tagged with
-2 votes
1 answer
127 views

What's a cleaner way to pass a function an array of values and then sort my object by those values?

The working code: ...
Ryan's user avatar
  • 27
0 votes
2 answers
2k views

Custom sorting function implemented as a jQuery plugin

I was asked to create a jQuery plugin that would sort homogeneous DOM elements in a given DOM container element. I came up with the idea to attach data-priority ...
luqo33's user avatar
  • 175
0 votes
1 answer
10k views

Sorting products by name or price

Lets preface this by saying that when it comes to javascript, I am a hack. I make what I need happen by cobbling together crappy, inefficient, redundant code. I want to get better. Recently I was ...
user avatar
3 votes
2 answers
3k views

Method for sorting numbers from user input

I have an input with numbers 1, 2, 3, 4 and I want to change the order of this number dynamically according to users input. You can find my code below and also a running example here. HTML ...
dixromos98's user avatar
5 votes
2 answers
515 views

How to verify if HTML table sort is stable or not?

I have implemented a HTML table sorting. I actually implemented a sort first using jQuery and then modified it based on the answer to this question for performance as I had done the same mistake. My ...
anirudh's user avatar
  • 153
3 votes
1 answer
203 views

Sorting possibly unstable and general jsfiddle/jquery problem

I have a simple sorting algorithm that I was told is possibly unstable. I'm wondering what in the sort is unstable. I have test cases written to test all fields with no issues. A secondary problem is ...
Organiccat's user avatar
1 vote
1 answer
142 views

Extracting Javascript functions

I have this jQuery click handler function that has three jobs: Set the time interval for the refresh rate Change the color on the clicked refresh rate selection Callback the tablesort functions to ...
steve_gallagher's user avatar