Mootools: How to add items to an existing Fx.Sort instance
-
30-10-2019 - |
Question
I've got a problem with Mootools Fx.Sort.
<ul id="list">
<li>One</li>
<li>Two</li>
</ul>
Javascript:
mySort = new Fx.Sort($$('ul#list>li'));
I can add more elements to the list:
$('list').adopt(new Element('li', { text: 'Three' }));
But the run-time created list elements, obviously, are not considered by Fx.Sort instance and they cannot be sorted with the others.
Is there a way to add them to the existing Fx.Sort? Or the only thing is to replace mySort
with a new instance every time I add an element at run-time?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow