I have an Array and I'm trying to use inArray() check if an item is not in the Array
var popUpArray = ['join','reset_password','photos','session_expired'];
if($.inArray(urlType, popUpArray) != 0) {
process code...
}
Basically I want to process the code within the if statement if urlType variable doesn't match one of the values in the array.
It works on the first value 'join' but not on the others. I understand this is because as soon as it doesn't match on one item it progresses.
I wondering how I could re-write this so it would only progress into the IF statement if the var urlType didn't match ANY of the items in the array.
thx