Hi,
If i script this line: sym.$("Rectangle","Rectangle2","Rectangle3").hide();
only the first rectangle is hidden.
You can use a class.
If i set the same class to my rectangles using the UI then sym.$(".rectangle").hide(); will be effective.
How to set a class using the UI:
There is a recent discussion on your issue: Using variables