Personally, I'd avoid using any name in a plugin that is something 
people do on an array. It might make sense from your plugin's POV, but 
jQuery is meant to be an arrayish object, so you just cause ambiguity on 
whether you're doing array stuff or dom stuff.

~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://nadir-seen-fire.com]
-Nadir-Point & Wiki-Tools (http://nadir-point.com) (http://wiki-tools.com)
-MonkeyScript (http://monkeyscript.org)
-Animepedia (http://anime.wikia.com)
-Narutopedia (http://naruto.wikia.com)
-Soul Eater Wiki (http://souleater.wikia.com)



John Resig wrote:
> Well, currently it is necessary. The jQuery object is treated like an
> array when it is passed in to the selector engine (and the selector
> results are push'd, sort'd, and splice'd on accordingly).
>
> It actually provided us with a decent speed-up, as well.
>
> --John
>
>
>
> On Mon, Feb 23, 2009 at 4:19 PM, prefect <[email protected]> wrote:
>   
>> I upgraded to jQuery 1.3.2 this evening, and was surprised by a weird
>> bug on a simple page in my application. The bug turned out to be due
>> to a conflict with a simple plugin I wrote for jQuery, which creates a
>> jQuery method called 'sort'. Apparently jQuery 1.3.2 aliases three
>> array methods onto the jQuery object, but is this really necessary?
>> The comments even say "for internal use only", so isn't there a way
>> you could do this without creating conflicts with external plugins?
>>
>> This is regarding lines 282-286 in jQuery 1.3.2:
>> // For internal use only.
>> // Behaves like an Array's method, not like a jQuery method.
>> push: [].push,
>> sort: [].sort,
>> splice: [].splice,
>>
>> --
>> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to