Skip to content

Instantly share code, notes, and snippets.

@nhducit nhducit/checkDuplicateID
Last active Aug 29, 2015

What would you like to do?
Javascript snippet to check duplicated ID in html page
Select all below snippet => drag and drop in browser bookmark bar
=> click on bookmark which you have just add => check the browser console
javascript:(function(){var e={};$("[id]").each(function(){var t=$('[id="''"]');if(t.length>1&&t[0]===this){;e.obj=this;e.obj2=t[0]}});console.warn("Duplicate ID:",,e.obj,e.obj2)})();
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.