jstl + jquery photo gallery

jstl + jquery photo gallery

I have to simply create a gallery which has prev and next actions.

I get the photos from backend. <c:set var="destPhotos" value="${local.destinationPhotos}"/>

if i do a foreach, i can get all photos. but i don't want that.

I need to navigate through each photo.

${destPhotos[0].imgUrl} will give me first photo

when the user clicks next, i just need to add the count.

Please help.