bug:jquery1.8.3, "in" operand is invalid: Object is missing

Source: Internet
Author: User

 inarray: function (elem, arr, i)  {var len;if  (arr)  {if  (core_ INDEXOF)  {return core_indexof.call (arr, elem, i);} Len = arr.length;i = i ? i < 0 ? math.max (0, len  + i)  : i : 0;// fix bug when ie8 ; The purpose of these two lines is to solve this bug                 if  (typeof  arr ===  "string")  {                     return arr.indexof (Elem);                 }         for  (;  i < len; i++)  {// Skip accessing in  sparse arraysif  (I in arr)  &&  (ARR[i] === elem))  {return i;}}} Return -1;},

jquery1.8, 638 lines to 665 lines, InArray.

IE8: Error: Message: "In" Invalid operand: Object is missing. String cannot use the In keyword iteration under IE8

Solution. Plus a string type of judgment.

Fix bug when IE8; these two lines are intended to resolve this bug if (typeof arr = = = "string") {return Arr.indexof (el                EM); }


bug:jquery1.8.3, "in" operand is invalid: Object is missing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.