jQuery.unique()


jQuery.unique( array )Возвращает: Arrayversion deprecated: 3.0

Описание: Сортирует массив с DOM-элементами, выстраивая их в порядке расположения в DOM, а также удаляя повторения.

As of jQuery 3.0, this method is deprecated and just an alias of jQuery.uniqueSort(). Please use that method instead.

The $.unique() function searches through an array of objects, sorting the array, and removing any duplicate nodes. A node is considered a duplicate if it is the exact same node as one already in the array; two different nodes with identical attributes are not considered to be duplicates. This function only works on plain JavaScript arrays of DOM elements, and is chiefly used internally by jQuery. You probably will never need to use it.

As of jQuery 1.4 the results will always be returned in document order.

Примеры использования