I’ve tried:
As a function called inside a dropdown.onChange() event handler and also inside an .onReady but no go on either.
Does that affect the outcome?
The visible group contains color buttons that correspond to color selection.
Ultimately this last .onReady is an attempt to capture an .onClick event of those visible buttons rather than having an event handler for each button (there are 29 groups and a total of 295 color buttons divided into these groups)
You can to use many selectors on one event or Element Class:
$w(‘#button1, #button2, #button3’).onClick()
or
$w(‘Button’).onClick
All elements Button on page will fire that event.
Maybe this helps.
I did come across this functionality, however, each button has the specific function of calling an image of a color that matches the button. As per my code, I’ve been able to activate the right group by matching the id with the value of the dropdown. Now all that’s left is calling that group’s .children (the buttons) and calling an .onClick on them. Finally, I have to figure out which of those several buttons was clicked and use its .id to call the corresponding image.