For example, will the first piece of code perform a full search twice, or is it smart enough to cache results if no DOM changes have occurred?
if ($(\"#navba
$.selectorCache() is useful:
https://gist.github.com/jduhls/ceb7c5fdf2ae1fd2d613e1bab160e296
Gist embed: