farzher / jQuery-Selector-Cache

Cache your selectors, without messy code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can this handle $$(this) inside a $$().each loop?

danieliser opened this issue · comments

Wondering how it/you would handle caching of objects inside loops via this?

No.

$$(this) never makes sense because $$ only accepts a string selector.
$$ is only for finding things, if you already have the thing this then you'll have to remember to use $(this)

Cool. Was the answer I expected. Was trying to avoid having to instantiate a new jquery object on something that had been cached with $$ further up the call stack.