Skip to content

Instantly share code, notes, and snippets.

@jimmy89Li
Created July 19, 2016 14:24
Show Gist options
  • Save jimmy89Li/9042211c1e26f27e367a9355e4778298 to your computer and use it in GitHub Desktop.
Save jimmy89Li/9042211c1e26f27e367a9355e4778298 to your computer and use it in GitHub Desktop.
remove duplicate divs based on their id
$('[id]').each(function (i) {
$('[id="' + this.id + '"]').slice(1).remove();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment