Created
June 2, 2014 14:19
-
-
Save mrbusche/e6f3b93a51715654edaf to your computer and use it in GitHub Desktop.
Bookmarklet to check for duplicate IDs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function () { var ids = {}; var found = false; $('[id]').each(function() { if (this.id && ids[this.id]) { found = true; console.warn('Duplicate ID #'+this.id); } ids[this.id] = 1; }); if (!found) console.log('No duplicate IDs found'); })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment