Isotope was utilized for sorting divs based on attribute values, however, a problem arises when a new div is added or an existing div is edited. The sorting functionality does not work properly in such cases, as the newly created or edited div is placed at the end of the list regardless of its intended position within the sorted order. Below is a snippet of my code. Thank you.
<div class="mainContainer">
<div class="subContainer" data-order="4">
4
</div>
<div class="subContainer" data-order="1">
1
</div>
<div class="subContainer" data-order="3">
3
</div>
<div class="subContainer" data-order="2">
2
</div>
</div>