[jQuery] Re: compare jQuery objects

2009-03-20 Thread DBJDBJ
Urgh, I was typing too fast ;o( Meaning was lost. This is the amended versio : On Mar 20, 9:45 am, DBJDBJ dbj...@gmail.com wrote: The real issue is architecture of jQ. By design jQ object keeps its state. State being array of references to dom nodes aka elements. The references NOT the

[jQuery] Re: compare jQuery objects

2009-03-20 Thread DBJDBJ
The real issue is architecture of jQ. By design jQ object keeps its state. State being array of references to dom nodes aka elements. The references no the objects. The pointers. One has to expect that anything can happen to the objects which are being referenced. Example: precode var $1 =

[jQuery] Re: compare jQuery objects

2009-03-19 Thread mkmanning
Two objects are equal if they refer to the exact same Object. On Mar 19, 1:48 pm, bob xoxeo...@gmail.com wrote: How is it that I get false for the following? Shouldn't I get true as a result? if not, why? div id=home/div $(document).ready(function(){         var one = $('#home');      

[jQuery] Re: compare jQuery objects

2009-03-19 Thread bob
Well, that did not help much So what is the problem then? Why do I get false? How do I get true value?

[jQuery] Re: compare jQuery objects

2009-03-19 Thread Jonathan
Object comparisons aren't really I think what mkmanning was saying is each time you reference $ ('#home') it's going to call jQuery to create a new Object. So to be honest I think even ($ ('#home') == $('#home)) would return false. Don't try and compare the jquery objects together. Use the ID

[jQuery] Re: compare jQuery objects

2009-03-19 Thread Matt Kruse
On Mar 19, 5:00 pm, bob xoxeo...@gmail.com wrote: Well, that did not help much So what is the problem then?  Why do I get false? Internally, a jQuery object is an array of references to DOM objects. Even though two jQuery objects may contain the same references internally, they are distinct