Nodes variable is shared across all invocations of $()
statianzo opened this issue · comments
Jason Staten commented
Any invocation of $('selector')
resets the nodes
value. That can lead to very unexpected behavior.
Consider this scenario:
<p class="foo">footext</p>
<p class="bar">bartext</p>
var foo = $('.foo');
var bar = $('.bar');
console.log(foo.html());
bartext
will be logged instead of the expected footext
.
I would suggest not scoping nodes
at the library level.
Kyle Barrow commented
Good point, will look into it.
Kyle Barrow commented
I've moved nodes inside Chibi in 0.3 so this issue should be resolved.