I have this situation
<div class="hidden">
<input name="bar-foo" value="test">
</div>
<div class="hidden">
<input name="bar-foo-baz" value="test2">
</div>
<div class="nothidden">
<input name="bar-foo" value="test3"> <!-- should be selected -->
</div>
<div class="nothidden">
<input name="foo-bar-baz" value="test4"> <!-- should be selected -->
</div>
I need to match inputs containing word foo and bar, not contained in a div which class is 'hidden'.
input[name*="foo"][name*="bar"]
matches all the four inputs.
:not(.hidden) input[name*="foo"][name*="bar"]
in my opinion, should match inputs not contained in something with class '.hidden', but it doesn't. How do I achieve this result?
Here is it a jsfiddle https://jsfiddle.net/8dLbz5ws/1/