The Prototype-CSS $$() function

The dollar dollar function is Prototype’s CSS Selector Engine. The ‘$$()’ function returns all css match elements. It was used quite same as the CSS selector. For example, to get all tags with the class “myclass”, we use the following:

$$(".myclass")

This function will return the array of elements match the selector string. And We can make the returned elements bold like this:

$$(".myclass").invoke('setStyle', { fontWeight: bold; })

Easy as pie…

Related Tutorials:

  1. The Prototype $() function
  2. The Form $F() function
July 26th, 2008 by Admin

Leave a Reply

Incoming search terms for the article:
prototype css, prototype css selector, css prototype, prototype change css, prototype matchelements, prototype css function, prototype selector tutorial, css function, prototype css functions, javascript prototype css