Welcome Guest. Sign in or Signup

0 Comments

How to workaround $.inarray issues?

Asked by: 1361 views f) Utilities

+1
0

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