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(){
$('input:text').css('color', '#FF1200');
});
I have tried filter() without success. :/
Thanks!
if your inputs are all contained with div’s;
if you want top level to bottom level parent check:
or if you want only one level parent check:
Edit: if it has ancestors of the same type without the class use this: