Reputation: 784
I have this code:
$("#someform").find("input:not[#myid]").change(function() {
....
});
But the code is not working.
The task:
I need to select all the inputs, but exclude one with ID="myid"
.
Your help is highly appreciated!
Upvotes: 0
Views: 1332
Reputation: 115242
Syntax of :not()
is not correct ,
$("#someform").find("input:not(#myid)").change(function() {
// --^-- --^--
....
});
Or you can use not()
$("#someform").find("input").not("#myid").change(function() {
....
});
Upvotes: 1