[jQuery] Bug: parent() changes reference of element

[jQuery] Bug: parent() changes reference of element

Hi,
I think I have found a bug in parent(), resulting in a reference change
somewhere.
Please check the error here:
http://www.yalpani.de/jquery/parent-check/
Explanation:
* I take this block of HTML...
<div id="testingOuter">
<div id="testingInner"></div>
</div>
* ...and do...
jObj = $('#testingInner');
console.log(jObj.get(0).getAttribute('id'));
* ...then call...
console.log(jObj.parent().get(0).getAttribute('id'));
(here something happens to jObj)
* ... and it results in a change of:
console.log(jObj.get(0).getAttribute('id'));
* At the end jObj points to its former parent.
Here is another check with _two_ chained parent() calls:
http://www.yalpani.de/jquery/parent-check/index2.html
Arash
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/