The description of jQuery.unique() states:
Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays
$.unique will only remove duplicate DOM element, if you need it for array :
var result=[] ; $.each([12,1,2,4,3,1,4,3,3,2,111], function(i,e){ if($.inArray(e,result)===-1) result.push(e) ;}); result;