I need a jquery selector for elements with only 1 child.
so a list with a single list item will match but empty lists or lists with more than one list item will not.
Is this possible?
$('li:only-child').parent();
?
Here is a demo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With