Skip to content

Instantly share code, notes, and snippets.

@Maciek416
Created June 21, 2011 20:34
Show Gist options
  • Save Maciek416/1038829 to your computer and use it in GitHub Desktop.
Save Maciek416/1038829 to your computer and use it in GitHub Desktop.
var someElementRef;
// ... time passes and someElementRef gets filled. Now we can do:
$(someElementRef).find(".some .fun .selector");
// Or, even better, cache the jQuery result before doing the above
// Only run this once so we don't keep re-jQueryifying
someElementRef = $("#bob");
// Hammer this object with .find() as often as desired
someElementRef.find(".some .fun .selector");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment