Specifically I need the equivalent selector for this, which worked in Prototype 1.5.0:
//for each element with class of 'myClassName' and an ancestor with id='myElementID'...
document.getElementsByClassName('myClassName', $('myElementID')).each( ... );
I tried this:
$$('myElementID input.myClassName').each( ... ); //Because I will be selecting input elements with this class
and this:
$$('myElementID .myClassName').each( ... ); //Trying to get all child elements with this class name
I get an empty list every time. The child elements I want are not necessarily direct children, so I know the > character will not work.
I don’t use Prototype and can’t find help on this exact issue. Any help is appreciated.
The $$ function will take any CSS Selector, so use a # to get
myElementIDby id. The rest of the selector to get all the inputs with classmyClassNameinside ofmyElementIDwas correct.