wetfish / basic

A tiny, customizable JavaScript UI framework.
MIT License
9 stars 3 forks source link

.find() overwrites elements list #39

Open itsrachelfish opened 7 years ago

itsrachelfish commented 7 years ago

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.