$.inArray giving error.
$.inArray giving error.
Hello,
I am new to jquery. I have created an javascript file and in that I am referecing jquery methods.
I have referenced below files for using jquery methods.
jquery-1.3.2.min.js and jquery-1.8.3.js files in my application
In my javascript file what I am doing is I am using this code
var filteredRows = jQuery.grep(eval(records).rows, function (elem, index) {
var IDValue = elem.toString().split(",");
return jQuery.inArray(IDValue[0], args) > -1;
});
I am getting error in line
jQuery.inArray(IDValue[0], args) > -1;
If I remove the above line which is causing error, it is working. I removed it for testing purpose to see.
I am passing set of ID's to eval(record).rows and get the matching ID's from that and returning it.
So, what I feel is error is because of inArray (I tried using $ instead of jquery but no change in result).
So, Please if anyone can suggest what I need to change in order to get this working.
Thanks.