I use multiple destructive functions all the time:

$('#share').children().not('h2').hide().end().end().slideUp('normal');

They're very useful when you need to set up specific elements within a 
container before doing something with the container itself.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of "Jörn Zaefferer"
Sent: Thursday, October 26, 2006 9:46 AM
To: jQuery Discussion.
Subject: [jQuery] Non-destructive jQuery

Hi folks,

I'd really like to see John's modifications to pushStack included in the jQuery 
core. Details here: http://www.nabble.com/Non-Destructive-jQuery-tf2482924.html

I'm actually wondering if that modification would break any existing code, as 
end() works like before. I guess the only situation is in scenarios like this:

var jq = $();
var jq2 = jq.destructiveOperation();
var jq3 = jq.anotherDestructiveOperation();

With the non-destructive pushStack implementation, this would give a different 
result. Is someone actually using such code?

I think this modification is very important to improve the overall jQuery...

--
Jörn Zaefferer

http://bassistance.de
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to