DEV Community

Discussion on: document.getElementById vs jQuery ID selector

Collapse
 
theonlybeardedbeast profile image
TheOnlyBeardedBeast

If you add an id to something, js creates an accessible variable with the same name, thats why yo shouldnt add the same id to multiple elements.