Div filter based on id
I can successfully hide divs that contains a line in id with this code:
Button:
<input type="button" id="mytest" value="filter"></input>
Js code:
//hides divs with class=screen3 and with 99 in its id
$('#myteste').click (function () {
$('div.screen3[id*="99"]').hide();
});
Now I need to do the opposite to hide the divs that does not contain the id string in it, but I don't know how to do it.
+3
source to share