It looks like you're using jQuery already, which has an $.inArray() utility method.
↧
Answer by Alexis Abril for Compare an array element to particular string of characters in javascript
↧
It looks like you're using jQuery already, which has an $.inArray() utility method.