Can form elements have the same name and id such as
<input name="somename" id="somename">
and still work with jquery
I know each element must have a unique id but i was wondering if there was any reason why they couldnt have the same name and id
In fact I'm not even sure if they need both a name and an id. I know an id is convenient for referencing the element in code and i know elements needs a name to be serialised for form submission.
Open in new window
Open in new window
you can additionaly add more than one selector, for example :
Open in new window