# Possible to set slider number or "active" slider

**URL:** <https://community.weweb.io/t/possible-to-set-slider-number-or-active-slider/7336>\
**Category:** How do I?\
**Created:** [February 29, 2024, 7:13am UTC](https://community.weweb.io/t/possible-to-set-slider-number-or-active-slider/7336 "2024-02-29T07:13:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![imb](https://avatars.discourse-cdn.com/v4/letter/i/ecd19e/32.png) [@imb](https://community.weweb.io/u/imb)\
**Post date:** [February 29, 2024, 7:13am UTC](https://community.weweb.io/t/possible-to-set-slider-number-or-active-slider/7336/1 "2024-02-29T07:13:11Z")

</div>

Trying to use a carousel as a lightbox for an array of images and wanted to allow users to select an image and then view it in a larger format.

 ![Screenshot 2024-02-28 at 10.55.50 PM](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/c/cf19c71c1b3451f559eda458a5452530430cb727.png)

---

<div class="post-metadata">

**Author:** ![imb](https://avatars.discourse-cdn.com/v4/letter/i/ecd19e/32.png) [@imb](https://community.weweb.io/u/imb)\
**Post date:** [February 29, 2024, 9:10am UTC](https://community.weweb.io/t/possible-to-set-slider-number-or-active-slider/7336/2 "2024-02-29T09:10:38Z")

</div>

I came up with a solution: I stored an object on user click and then used a javascript formula field to rank the array with that object with first which worked lols

---

<div class="post-metadata">

**Author:** ![D-EFFCON](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@D-EFFCON](https://community.weweb.io/u/D-EFFCON)\
**Post date:** [March 14, 2024, 12:01pm UTC](https://community.weweb.io/t/possible-to-set-slider-number-or-active-slider/7336/3 "2024-03-14T12:01:11Z")

</div>

Hi imb, are you able to share the JavaScript formula you used please? I’m trying to create an image carousel as well
