Ticket #3471 (closed enhancement: wontfix)
Performance suggestion on selector
|Reported by:||sandstrom||Owned by:|
It's common to set the id of body to something page-specific (eg. body id="unique" or id="controller-action" in an MVC setup). Thus one can easily target code to specific pages.
Example: $('body#login-email input#specific').focus();
I don't know if it would be a performance benefit, perhaps it would be an idea to have jquery return (cancel) queries through the dom when the id is set for a body element, and there is nothing on the body element. So instead or parsing several hundred dom nodes one would go straight for the body, and if it's not there one can abort.