Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.find() overwrites elements list #39

Open
itsrachelfish opened this issue Feb 20, 2017 · 0 comments
Open

.find() overwrites elements list #39

itsrachelfish opened this issue Feb 20, 2017 · 0 comments
Labels

Comments

@itsrachelfish
Copy link
Member

When using .find() the element list is overwritten, meaning if you have a cached basic object and you use .find() any subsequent calls to that cached object will be based on the results of that find, instead of the original element.

For example:

var element = $('.selector');
element.find('.child');

console.log(element);

After using find, the variable element will now contain the results of the .find() operation and not the original selector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant