Vote count:
0
I have N DIV's. Each represent a physical computer. Each DIV can have N UL elements. Each UL represents software type installed on server. And finally each UL element contains N LI elements representing data related to software (UL).
I want to select a server that does not contain LI element with certain data (data is represented as data-id attribute on LI element)
I created a fiddle to work on that and using .not() (line 3 in javascript window):
But it always returns both servers not matter what input provided
$('.srv').not('li[data-id="2"]').each(function(){
servers += $(this).attr('id') + ', ';
});
asked 45 secs ago
Getting parent that does not contain child with attribute value
Aucun commentaire:
Enregistrer un commentaire