Welcome Guest. Sign in or Signup

f) Utilities

Posted on September 18, 2012 0 Comments

How to workaround $.inarray issues?

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: