arrays - jQuery .inArray question -


I have to check whether my line ID is within an array. If I set a fixed value to myindex then it works but as always, it always returns the FALSE value. Thank you.

  $ ('# stripeMeSubSubCat tr') Each (function () {Myindex = $ .trim ($ (this) .closest ("tr"). Attr ("id"); var array = [0, 52, 53]; Alert (mindex); alerts ( Array); if ((JQuery.inArray (myindex, array)) == -1) {var equals = "wrong";} and {var equal = "true";} warning (equivalent);}); Added parseInt () and problem fixed in myindex  


Comments