I originally stumbled upon this having Internet Explorer versions returning unextended elements, and firefox returning extended ones... fixed if by $$ing it... ;-)
On Nov 26, 2007 11:39 AM, Thomas Fuchs <[EMAIL PROTECTED]> wrote: > > Ah, ic. > > Anyway, $$ extends all elements it returns -- regardless if they where > included in "static" HTML, created by setting .innerHTML, or using DOM > methods to create them. :-) > > The same is true for all other Prototype methods that return elements, > that is $ and all Element.xxx methods that return an element. > > Btw, here's an article about how the extension mechanism works, for > reference: > http://prototypejs.org/learn/extensions > > Maybe we could extend that article to include more specific info on > which Prototype methods are guaranteed to return extended elements. > > Best, > Thomas > > Am 26.11.2007 um 11:12 schrieb Deniz Adrian: > > > > > > you got that 100% correctly, thanks ;-) > > > > On Nov 26, 2007 2:29 AM, Nicolás Sanguinetti <[EMAIL PROTECTED]> > > wrote: > >> > >> If I undestand correctly, Deniz means elements that were already in > >> the HTML code, not elements created by Prototype. > >> If that is the question, then the answer is yes, they are extended. > >> (BTW, elements created by Proto are *already* extended, so you don't > >> need to extend those, only those that are in the html, OR that were > >> created with "normal" javascript -- ie, document.createElement) > >> > >> Best, > >> -Nicolas > >> > >> > >> On Nov 25, 2007 3:43 PM, Thomas Fuchs <[EMAIL PROTECTED]> wrote: > >>> > >>> I don't understand what you mean. Please give an example. > >>> > >>> Am 25.11.2007 um 18:25 schrieb Deniz Adrian: > >>> > >>> > >>>> > >>>> what if those elements weren't dynamically drawn by prototype but > >>>> are > >>>> statically contained in HTML? are they extended then? > >>>> > >>>> On Nov 25, 2007 4:44 PM, Thomas Fuchs <[EMAIL PROTECTED]> wrote: > >>>>> > >>>>> $$ extends all elements it returns, so yes, you can remove it. > >>>>> > >>>>> Am 25.11.2007 um 15:29 schrieb Roland: > >>>>> > >>>>> > >>>>>> > >>>>>> im think its not after doing some tests... but im still not 100% > >>>>>> sure > >>>>>> =] > >>>>>> > >>>>>> On 25 nov, 15:27, Roland <[EMAIL PROTECTED]> wrote: > >>>>>>> $$('.class-a', '.class-b').each(function(single_element){ > >>>>>>> single_element = $(single_element); // can i remove this? > >>>>>>> > >>>>>>> }); > >>>>>>> > >>>>>>> t thought this was necessary in prototype 1.5... > >>>>>>> > >>>>> > >>>>> > >>>>>> > >>>>> > >>>> > >>>>> > >>> > >>> > >>>> > >>> > >> > >>> > >> > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
