[EMAIL PROTECTED] schrieb: > Why does .parent() modify the original object? This isn't right according > to me. > > Let's say i have this code: > testDOM = <SOMEOBJECT>.parent().parent()[0]; > > And i want to do some more work on the original object; > <SOMEOBJECT>.hide(); > > I get this error: > ".. IS NOT A FUNCTION" > > I am unsure on how to correctly get the parent's parent without changing > the original object. > > -- Gilles
Use a cloned object or end(): var testDOM = $( <SOMEOBJECT> ).parent().parent()[0]; <SOMEOBJECT>.hide(); or: testDOM = <SOMEOBJECT>.parent().parent()[0]; <SOMEOBJECT>.end().end().hide(); -- Klaus _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
