Inserts element into parent sorted according to its HTML attribute data-sort.
element
parent
data-sort
Assumes:
Parent to insert into
Element to insert
Inserts
element
intoparent
sorted according to its HTML attributedata-sort
.Assumes:
parent
andelement
, has adata-sort
attribute. This is the basis for sorting.parent
starts off empty or pre-sorted.parent
's children is not changed (ie it always remains sorted)