jQuery cleaning up two strings (compare string1 to string2 and remove items not uniq)

Posted by atmorell on Stack Overflow See other posts from Stack Overflow or by atmorell
Published on 2010-04-13T21:48:33Z Indexed on 2010/04/13 21:53 UTC
Read the original article Hit count: 447

Filed under:

Hello,

How do I remove the oldItems from the newItems string? (remove Blue and Green) newItems is generated from jQuery autocomplete and I would like to remove already selected items from the select list.

newItems = Blue \n Red \n Black \n Yellow \n Green \n
oldItems = Blue,Yellow,Orange,Green

Best regards. Asbjørn Morell.

© Stack Overflow or respective owner

Related posts about jQuery