Home › Forums › JavaScript › Jquery: If ul has no li › Reply To: Jquery: If ul has no li
September 18, 2016 at 7:16 am
#245669
Beverleyh
Participant
Nice, but it would fail in the case of the given example markup due to the new lines being interpreted as a space;
< ul >
</ul >
<ul >
<li > some data
</li >
</ul >
The demo CSS way only works if the ul start and end tags are butt up to one another and on the same line;
<ul></ul>