jQuery multiple conditions within if statement
Try
if (!(i == 'InvKey' || i == 'PostDate')) {
or
if (i != 'InvKey' || i != 'PostDate') {
that says if i does not equals InvKey
OR PostDate
i == 'InvKey' && i == 'PostDate'
will never be true, since i
can never equal two different things at once.
You're probably trying to write
if (i !== 'InvKey' && i !== 'PostDate'))