I got this small piece of code to reset a form:
$("#reset").click(function() {
$(':input','#fundingpossibility')
.not(':button, :submit, :reset, :hidden')
.val('');
});
I'd like to add an input field with, let's say, an id of #test
to the .not()
selector. I've tried various things, but can't make it to work. Does anyone have any ideas?
Just add another comma (multiple selector), for example:
$("#reset").click(function() {
$(':input','#fundingpossibility')
.not(':button, :submit, :reset, :hidden, #test')
.val('');
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With