I know the selector used for name is $('input[name=xyz]')
but what if I have a condition ex.
if (input.is("[name=listItem,GrdFromDateTime,GrdToDateTime,GrdRemarks]"))
how can I achieve this?
Thanks in Advance :)
Keep the names in an array and check if the current input name
attribute is in the array.
var names = ["listItem", "GrdFromDateTime", "GrdToDateTime", "GrdRemarks"];
if(names.indexOf(input.attr('name')) !== -1) {
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