When using the css selector :has
I'm only allowed to put basic properties such as tag name:
.field:has(input)
But not:
.field:has(input[type="checkbox"])
Why is this? I want to select the element of class field, NOT the input.
:has
isn't a selector in CSS - you are talking about jQuery.
Use: $('.field:has(input[type="checkbox"])');