Revision: 13461
Updated Code
at September 19, 2010 04:27 by gustavopaes
Updated Code
arr = [1, 2, 3, 4, 5] // array inicial var removeItem = 2; // item do array que deverá ser removido arr = jQuery.grep(arr, function(value) { return value != removeItem; }); // new array // [1, 3, 4, 5]
Revision: 13460
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at April 24, 2009 10:29 by gustavopaes
Initial Code
arr = [1, 2, 3, 4, 5] // array inicial var removeItem = 2; // item do array que deverá ser removido arr = jQuery.grep(arr, function(value)) { return value != removeItem; }); // new array // [1, 3, 4, 5]
Initial URL
Initial Description
Remove item (number or string) from array, using jQuery (method grep).
Initial Title
Remove item from array with jQuery
Initial Tags
array, jquery
Initial Language
JavaScript