KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
If I have in the page unnecessary id s on elements, like the HTML Helper does in ASP.Net-MVC . Does it reduce the performace of my id selectors? (I have a page with enormous amout of elements) Example: // First DOM <HTML> ... <input type="text" value="first" id="useless" /> <input type="text" value="second" id="useful" /> </HTML> // Second DOM <HTML> ... <input type="text" value="first"/> <input type="text" value="second" id="useful" /> </HTML> Script: <script> alert($('#useful').val()); // never select the first element (with the useless id) </script>
Tags (comma-separated)
Save Edits
Cancel