1
a selector like this:
$('#minhaDiv input[id!="meuId1"]');
is well comun. I wonder if it is possible to do something like:
$('#minhaDiv input[id!="meuId1" && id!="meuId8"]');
Thank you.
1
a selector like this:
$('#minhaDiv input[id!="meuId1"]');
is well comun. I wonder if it is possible to do something like:
$('#minhaDiv input[id!="meuId1" && id!="meuId8"]');
Thank you.
3
I know two ways to do this:
$('#minhaDiv input[id!="meuId1"][id!="meuId8"]');
or
$('#minhaDiv input').filter(function(){
var id = jQuery(this).attr('id');
var idInvalidos = [
'meuId1',
'meuId8',
];
return !jQuery.inArray(id,idInvalidos);
});
Browser other questions tagged jquery selectors
You are not signed in. Login or sign up in order to post.
another possibility is
#minhaDiv input:not(#meuId1):not(#meuId8)
– Tobias Mesquita