Selectors in Mooltools
For reference, in Mootools there are 3 types of selectors:
- $$ - selects all the elements in the page.
Example: $$(’a') - selects all the anchors in the page
- $ES - Does the same thing as $$ but an optional parameter can be passed to refine the selection.
Example:
$ES(’a') - Same thing as $$(’a');
$ES(’a',’something’) - selects all the anchors inside the element with the id ’something’ ($(’something’))
- $E - same thing as $ES but it only returns the first element found. Example: $(’a',’something’) - returns the first anchor inside the element with the id ’something’ ($(’something’))
Random Posts