This is undocumented but try $(arr1).not(arr2).get()

Sent from my iPhone

On Nov 1, 2007, at 9:38 PM, Flesler <[EMAIL PROTECTED]> wrote:


Well.. you have jQuery.inArray, that will do part of the job. It gives
you the index of the given value in one array or -1.
jQuery.inArray( 1, [8,3,2,1,2] ) == 3. You must iterate and ask each
time whether the function returns -1.

No existing function that I know about.

On 1 nov, 18:26, rgrwkmn <[EMAIL PROTECTED]> wrote:
Is there a function that exists for the purpose of comparing two
arrays and returning the values that are different? The arrays I'm
comparing are likely to contain all the same values but in a different
order. From what I read in the jQuery docs there is no function to
compare array orders.

I can think of a solution where I make a function to loop through both
arrays sequentially and simultaneously, comparing each value pair and
spitting out the ones that are different. Does anyone know of a
function that already does this? If not, would it make a helpful
plugin for jQuery?

Reply via email to