Answer the question
In order to leave comments, you need to log in
Location of DOM elements?
Hello. I wonder if it is possible to implement sorting of DOM elements depending on the value of the child element. Here is an example fidl. The "p" tag has a number. It is necessary that, depending on this number, the divs with the color* class move around the DOM in ascending or descending order. I wrote, for example, the number 1 in the "p" tag and this color should come first in the DOM, and so on, I think the essence is clear))
https://jsfiddle.net/kjpoycdk/2/
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question