Cache your selectors, without messy code.
- Include the /src/jquery.sc.js file.
Instead of $('div')
use $$('div')
$$('div')
The next time you call $$('div')
it will be fetched from the cache.
$$('div', 'clear')
Invalidates the cache. The next time you call $$('div')
It will return fresh results.
$$('div', 'fresh')
Shortcut for doing $$('div', 'clear')
$$('div')
No cache: 444ms
Selector Cache plugin: 3ms
Storing results in variables: 2ms