You can use .prependTo()
immediately after the re-order, like this:
$("#topNumber").prependTo("#ImportantNumbers");
You can see it working here, all it’s doing is taking the element and inserting it as the first child on the <ul>
, effectively moving it to the top.
Alternatively when you sort, use :not()
to exclude it depending on how the sorting works, for example:
$("#ImportantNumbers li:not(#topNumber)").randomize();