When selecting elements jQuery provides an optional 2nd argument (context) which limits the search to a specific node. Adding this argument usually speeds up queries, but when the query is by id adding the context actually siginificantly slows down the query.