Having issues with .not with :contains
I'm having an issue making something work that I think should work fairly easy
here is some code
- var ShowVar = ".search:contains(" + document.getElementById("Find").value +")";
$('.search').not(ShowVar).hide();
$(ShowVar).not('.define').show();
- <div id=Ex class=search>
- Content
- <ul class=define>
- <li>List</li>
- </ul>
- </div>
I'm trying to make it so a user can type in a value for "Find" and it shows all the sections with the class of search and hides
I can do that easily, but I want it to ignore the define class areas when it's searching for content.
In the above code if someone typed in List as the search it would not show the Ex div, but if you typed Content it would show.
I'm not sure what is wrong with my code.