Welcome Guest. Sign in or Signup


How to workaround $.inarray issues?

Asked by: 1639 views f) Utilities


If you have a collection of objects, you cannot use $.inarray to find out the index of an object in the collection. $.inarray has a bug as of this writing (Sept, 2012) which makes it usable only with primitive type collections.

To work around this, first override the Array.indexOf prototype like this:

Comments on Question