> 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 someone can point me to explaining this or can someone > recap the issues? > thanks, ke han
I'll try to explain the issue with an example. Within the code for the accordion plugin (see ), I have something like this: var $target = jQuery(event.target); var $content = jQuery($target).next(); I'm using jQuery(target) on the second line to clone the target object before using next, because I need to call other methods on $target and don't want to use end(). With the modifications to pushStack, that could be rewrote to this: var $target = jQuery(event.target); var $content = $target.next(); Calling next() on $target won't modify my reference to $target, therefor I don't have to use end() nor have to clone $target. This is alway the case when you save a reference to a jQuery object and don't want to modify the referenced object. I hope that helps to understand the problem. -- Jörn Zaefferer http://bassistance.de -- GMX DSL-Flatrate 0,- Euro* - Überall, wo DSL verfügbar ist! NEU: Jetzt bis zu 16.000 kBit/s! http://www.gmx.net/de/go/dsl _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
