jQuery object are immutable?

Posted by Daniel on Stack Overflow See other posts from Stack Overflow or by Daniel
Published on 2011-11-16T09:27:30Z Indexed on 2011/11/16 9:51 UTC
Read the original article Hit count: 261

Filed under:

Hello a new noob on jQuery here and I was wondering if jQuery objects are immutable. For example:

var obj1 = $("<tag></tag>");
var obj2 = obj1.append("something");

Will obj1 and obj2 be the same meaning obj2 will reference obj1?

UPDATE:

The above example kind of scratches the surface of what i want to know, a more accurate question is : If i chain function from the jQuery api will they return the same object or a new one (as the case with strings in Java)?

© Stack Overflow or respective owner

Related posts about jQuery