Asked this question ten minutes ago, but realized that I used the term parent instead of ancestor. I'm looking for something that refers to a class that has a particular ancestor.
How can I select all inputs that do not have an parent of a particular class?
Here I just want to get the inputs that do not have a parent with the class not-parent
$(document).ready(function() {
$("div:not(.not-ancestor) > input[type='text']").css('color', '#FF1200');
});
Thanks!