Just a quick heads up that Sylvain Zimmer has posted a performance upgrade for Prototype''s $$ selector, making the function up to 20 times faster. This could be just the thing I''ve been looking for recently as a site I''m currently developing makes heavy usage of that $$ selector and I have noticed that this can lead to a noticeable lag on page load. See http://www.sylvainzimmer.com/index.php/archives/2006/06/25/speeding-up-prototypes-selector/ for the post. Cheers, Mike.
I saw something about the $$ selector on a review site, but I see nothing about this in the documentation. Can someone point me to it? Keith Davis (214) 906-5183 -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Mike Rumble Sent: Thursday, June 29, 2006 3:36 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails-spinoffs] Speeding up Prototype''s $$ Selector Just a quick heads up that Sylvain Zimmer has posted a performance upgrade for Prototype''s $$ selector, making the function up to 20 times faster. This could be just the thing I''ve been looking for recently as a site I''m currently developing makes heavy usage of that $$ selector and I have noticed that this can lead to a noticeable lag on page load. See http://www.sylvainzimmer.com/index.php/archives/2006/06/25/speeding-up-p rototypes-selector/ for the post. Cheers, Mike. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
I can''t find anything right off the top of my head, but it''s basically a way to select dom elements using css style selectors. So just use some css syntax in quotes and you should get all elements matching that selector. As a side note, the css syntax it accepts is quite thorough, so don''t think you''re limited to the simple stuff that IE allows. On 6/30/06, Keith Davis <keithdavis-mQJYS7++JhLwMB+CN6uaIQ@public.gmane.org> wrote:> I saw something about the $$ selector on a review site, but I see > nothing about this in the documentation. Can someone point me to it? > > > Keith Davis (214) 906-5183 > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Mike > Rumble > Sent: Thursday, June 29, 2006 3:36 AM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: [Rails-spinoffs] Speeding up Prototype''s $$ Selector > > Just a quick heads up that Sylvain Zimmer has posted a performance > upgrade for Prototype''s $$ selector, making the function up to 20 times > faster. > > This could be just the thing I''ve been looking for recently as a site > I''m currently developing makes heavy usage of that $$ selector and I > have noticed that this can lead to a noticeable lag on page load. > > See > http://www.sylvainzimmer.com/index.php/archives/2006/06/25/speeding-up-p > rototypes-selector/ > for the post. > > > Cheers, > Mike. > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
It works wonders for unobtrusive scripting $$(''a.noFollow'').each(function(el) { el.onclick = function() { return(false); } }); ok, so not the finest thing to do, but now all links with the class of noFollow won''t do squat :) Andreas> I saw something about the $$ selector on a review site, but I see > nothing about this in the documentation. Can someone point me to it?