Hi John, I liked them. If a jQuery object is "array-like", it makes sense to have the array methods, it's very convenient. And as slice() remains this seems inconsistent.
I think this was a documentation problem more than anything - if anyone is going to create methods named to native ones, it better be jQuery itself. cheers, - ricardo 'On Feb 25, 3:44 pm, John Resig <[email protected]> wrote: > Ok, just to chime in again - I removed the sort/splice/push methods from > jQuery:http://dev.jquery.com/ticket/4250 > > I made sure that there was no longer a need for them in Sizzle. > > --John > > On Wed, Feb 25, 2009 at 1:42 PM, prefect <[email protected]> wrote: > > > You mean instead of Array.sort? Well, yes, because I'm not only > > interested in sorting DOM nodes in an array, I want to rearrange them > > in the DOM as well. So it's basically just a convenience plugin, > > wrapping Array.sort and performing the DOM rearrangements afterwards. > > My brief and cursory search of jQuery plugins turned up nothing of the > > sorts (heh), so I just wrote my own simple plugin. > > > -- > > Frode > > > On Feb 25, 7:25 pm, ricardobeat <[email protected]> wrote: > >> Just to put my finger on the cake, is there any special reason you're > >> using a custom plugin instead of the available sort() method? > > >> On Feb 24, 8:27 pm, prefect <[email protected]> wrote: > > >> > To the defence of jQuery here, I don't think that would work. As I > >> > understand, the purpose of aliasing those methods is to make the > >> > jQuery object work transparently as an Array object when passed to > >> > Sizzle. > > >> > All in all, this was not a lot of trouble for me. Luckily I worked out > >> > pretty fast what was wrong (removing custom plugins to jQuery, of > >> > course being a prudent course of action in debugging). I wish jQuery > >> > some day can protect those methods better, but at least a notice to > >> > other developers of plugins would be nice. Even though, point taken > >> > from Daniel Friesen, I might think again before using method names > >> > that are common in native objects the next time. nodeSort it is on > >> > this occasion then :-) > > >> > -- Frode --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---
