I have a SharePoint list that has a column that allows a user to prioritize or rearrange a list of projects.
I created a piece of it in jsfiddle using arrays. I'm able to update the values but unable to shift the numbers and order https://jsfiddle.net/isogunro/btft1Lys/
Since you are modifying the original array when you do the value replacement, why not just use a sort on that array to get the items reordered?
Here is an updated version (https://jsfiddle.net/zephyr_hex/yeqa1yv6/)
The viewer will learn the basics of jQuery including how to code hide show and toggles.
Reference your jQuery libraries:
Include your new external js/jQuery file:
Write your first lines of code to setup your site for jQuery…