I am trying to select a list item element that has a label element inside it. My goal is to use the :has() selector to target the list item and then match text within the label using the :contains() selector. Can I achieve this in a single line of jQuery code? If not, what would be a clean and efficient way to accomplish this task?
<li>
<!-- This is the one I need to select -->
<label>Label 1</label>
<!-- there are more items here -->
</li>