equivalent in coronal/lua where i can control my objects like in Jquery

Is there any equivalent way in coronal/lua where i can control my objects like controlling my elements in jquery.

in html / javascript / jquery

<div id=“slides”>

            <div class=“slides” id=“pic1” style=“display: block”>

                <img src="./img/slide1.jpg"/>

                <p>Caption Here</p>

            </div>

            <div class=“slides” id=“pic2”>

                <img src="./img/slide2.jpg"/>

                <p>Caption Here</p>

            </div>

            <div class=“slides” id=“pic3”>

                <img src="./img/slide3.png"/>

                <p>Caption Here</p>

            </div>

            <div class=“slides” id=“pic4”>

                <img src="./img/slide4.jpg"/>

                <p>Caption Here</p>

            </div>

  </div>

all i need to control all my div that has “class” of “slides” is

$(".slides").css(“width”, “100px”);

Is there a way where i can do this in corona/lua? for example

local pic1 = display.newImageRect(“images/pic1.png”,193,50)

pic1.class = slides

local pic2 = display.newImageRect(“images/pic2.png”,193,70)

pic2.class = slides

local pic3 = display.newImageRect(“images/pic3.png”,193,90)

pic3.class = slides

???

Thanks you guys so much in advance

You can’t really do things by “class” like you can in JavaScript.  You would have to do it at a lower level.  For instance, you can make sure the objects are in the same group, then iterate over the group and change them like that (it’s what jQuery is doing under the hood for you)

Rob

You can’t really do things by “class” like you can in JavaScript.  You would have to do it at a lower level.  For instance, you can make sure the objects are in the same group, then iterate over the group and change them like that (it’s what jQuery is doing under the hood for you)

Rob