Re: [jQuery] Non-destructive jQuery

2006-10-27 Thread ke han
I have read Jon's post about a solution to the destructive calls. Being late to the game, I am confused as to the meaning of all this. I sort of understand that some calls are queries and others change things, but what is the impact of this that requires a solution? Is there a thread

Re: [jQuery] Non-destructive jQuery

2006-10-27 Thread Jörn Zaefferer
I have read Jon's post about a solution to the destructive calls. Being late to the game, I am confused as to the meaning of all this. I sort of understand that some calls are queries and others change things, but what is the impact of this that requires a solution? Is there a thread

Re: [jQuery] Non-destructive jQuery

2006-10-27 Thread Dave Methvin
I am pretty sure I don't have any code that would be broken by the new behavior. The entire test suite passes with it, although that may be more an indictment of the test suite than a stamp of approval. :-) I'm sure we can write some test that will break when changing the destructive

[jQuery] Non-destructive jQuery

2006-10-26 Thread Jörn Zaefferer
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

Re: [jQuery] Non-destructive jQuery

2006-10-26 Thread Kurt Mackey
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

Re: [jQuery] Non-destructive jQuery

2006-10-26 Thread Jörn Zaefferer
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. Ok, but that will still work with

Re: [jQuery] Non-destructive jQuery

2006-10-26 Thread Kurt Mackey
: [jQuery] Non-destructive jQuery 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. Ok

Re: [jQuery] Non-destructive jQuery

2006-10-26 Thread Yehuda Katz
Someone who didn't understand jQuery's destructiveness might have done something like that by accident (cached a jQuery object, used a destructive operation, and then reused the cached object under the assumption that it wasn't destructive. It might not matter, or someone in this situation might

Re: [jQuery] Non-destructive jQuery

2006-10-26 Thread Dave Methvin
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

Re: [jQuery] Non-destructive jQuery

2006-10-26 Thread Kurt Mackey
Methvin Sent: Thursday, October 26, 2006 11:48 AM To: 'jQuery Discussion.' Subject: Re: [jQuery] Non-destructive jQuery 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

[jQuery] Non-Destructive jQuery

2006-10-20 Thread John Resig
Hi Everyone - There's been some rabble-rousing concerning the destructive nature of jQuery (it's ok, rousing is a good thing ;-)). I claimed that it'd be easy to have it exist as a plugin. Well, it took me all of 10 minutes, but here it is: jQuery.fn._pushStack = jQuery.fn.pushStack;

Re: [jQuery] Non-Destructive jQuery

2006-10-20 Thread John Resig
Just an optimization, but it would be good to have the .destructiveMethod(selector, function) case not create a new object since it doesn't (permanently) change the original object. It looks like _pushStack will stack the old jQuery object's nodes in the new jQuery object, which it won't use.