javascript – How do I alter the position of HTML elements the most efficient?-ThrowExceptions

Exception or error:

This question is of theoretical nature. I have build a filter that hides/ shows me several HTML elements. The thing I want to achieve is that after I filter, the still visible elements get moved to the top . Otherwise I have “gaps” in my HTML view.
How would I do such a thing?
Do I have to make a list out of the html elements I want to sort?

How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *