Answer the question
In order to leave comments, you need to log in
A drop zone is inside another drop zone. jQuery UI Droppable?
There is a hierarchical list of product categories:
It is quite logical that it is inserted into the page markup through an unordered list <UL>-<LI> . The most important point is that each element of the list is "dragable" (drag) , and can also take on dragged elements (droppable) - in this way the elements are reordered. To enable these features, the jQuery UI Draggable , jQuery UI Droppable plugins are used , and the jQuery library itself.
How are "sublists" - subgroups - arranged in the markup?
Initially, I did not format the markup in accordance with the W3C standards, namely: the subcategories lay outside the parent <LI> element . Those. The list shown in the screenshot was designed in this way*:
<ul><br>
<li>электроника</li><br>
<ul><br>
<li>телевизоры</li><br>
<ul><br>
<li>toshiba</li><br>
</ul><br>
</ul><br>
<li>DVD-плееры</li><br>
<li>MP3-плееры</li><br>
</ul><br>
<ul><br>
<li>электроника<br>
<ul><br>
<li>телевизоры<br>
<ul><br>
<li>toshiba</li><br>
</ul></li><br>
</ul></li><br>
<li>DVD-плееры</li><br>
<li>MP3-плееры</li><br>
</ul><br>
Answer the question
In order to leave comments, you need to log in
www.w3.org/TR/html401/struct/lists.html#edef-LI Tell your "radishes" that they are bad people, ul or ol should not be put in li, li is a text node. The proof of this is at least that the closing tag is not required, it does not participate in the structure, it only frames the text.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question