Skip to content

Instantly share code, notes, and snippets.


glennyboy/jQuery Remove Duplicates Secret

Last active Jul 2, 2019
What would you like to do?
jQuery Remove Duplicates
jQuery(document).ready(function() {
// remove duplicates
var seen = {};
$('ul li').each(function() {
var txt = $(this).text();
if (seen[txt])
seen[txt] = true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.