I’m using Jquery Mobile and have the same form on every page. As Jquery Mobile pulls in pages into the DOM I will end up with at least 2 pages in the DOM most of the time.
Every page has a form like this:
<form name="login" class="logForm">
<input type="text" name="user" value="" />
<input type="password" name="password" value="" />
</form>
I would like to know, if I can omit the ids on the form and all its elements in order to avoid having duplicate IDs in the DOM.
Question
Is this possible at all or do I need to ID every element plus the form itself?
There is no need to have
ids on form elements, so yeah.Go crazy.