Revision 641d6d24
Von Moritz Bunkus vor etwa 8 Jahren hinzugefügt
js/kivi.js | ||
---|---|---|
console.error('kivi.run("' + function_name + '"): No function by that name found');
|
||
return undefined;
|
||
};
|
||
|
||
ns.detect_duplicate_ids_in_dom = function() {
|
||
var ids = {},
|
||
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 :)');
|
||
};
|
||
});
|
||
|
||
kivi = namespace('kivi');
|
Auch abrufbar als: Unified diff
kivi.detect_duplicate_ids_in_dom: Funktion zum Auffinden doppelter IDs im DOM