I will have to toggle an ID on a <div>
and was wondering if toggling element IDs will cause any errors.
Some people do not like this for stylistic reasons, but this question is not about that. I am asking whether it will cause any errors and whether it causes bad effects to do so.
Toggling the id should not cause any errors or other side effects as long as the id is not repeated on a page.
You can go ahead and do it.
You can also check out the rules of using the id attribute correctly here:
http://www.w3schools.com/tags/att_global_id.asp
This article describes the new specifications of the id atribute in HTML5:
http://mathiasbynens.be/notes/html5-id-class
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With