Currently, I am brainstorming a selector that can target every textarea
element, with the exception of those within the .noSpell
class.
Essentially, my goal is to have it identify:
<div>
<textarea />
</div>
while excluding this scenario
<div class="noSpell">
<div>
<textarea />
</div>
</div>
I initially attempted:
$(":not(.noSpell) textarea")
However, this approach proved ineffective as it matches the inner elements despite not selecting the outer one.
Consequently, what would be the correct way to create a selector that omits specific sections of the DOM tree based on their class name?