There is a notable difference between this two aproaches? 1.- $$( "#miTable tr.myClass td input.inputClass" ) 2.- $$( ".inputClass" ) Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
Hey! Javier Martinez a écrit :> There is a notable difference between this two aproaches? > > 1.- $$( "#miTable tr.myClass td input.inputClass" ) > 2.- $$( ".inputClass" )Well, yes, there is. If you do need the amount of specificity from the first call, use $$ indeed. If your target elements are the only one featuring the inputClass class, use document.getElementsByClassName instead. It''s way faster on large DOMs. Even using $$ still, the simpler the rule, the faster the run. -- Christophe Porteneuve aka TDD tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
Thanks!! this is what I i want!! 2006/10/4, Christophe Porteneuve aka TDD <tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org>:> > > Hey! > > Javier Martinez a écrit : > > There is a notable difference between this two aproaches? > > > > 1.- $$( "#miTable tr.myClass td input.inputClass" ) > > 2.- $$( ".inputClass" ) > > Well, yes, there is. If you do need the amount of specificity from the > first call, use $$ indeed. > > If your target elements are the only one featuring the inputClass class, > use document.getElementsByClassName instead. It''s way faster on large > DOMs. > > Even using $$ still, the simpler the rule, the faster the run. > > -- > Christophe Porteneuve aka TDD > tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org > > > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---