Last active
August 29, 2015 14:16
-
-
Save felipem775/8df28affaff488846446 to your computer and use it in GitHub Desktop.
ids repetidos
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
// Basado en http://stackoverflow.com/questions/482763/jquery-to-check-for-duplicate-ids-in-a-dom | |
$('[id]').each(function(){ | |
var ids = $('[id="'+this.id+'"]'); | |
if(ids.length>1 && ids[0]==this) | |
console.warn('IDs con repeticiones: ' + this.id + ', veces:' + ids.length); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
está práctico esto, sí.