How to set slider pagination number for each slide?

Hi there!

I have developed a project in which I have to add pagination number in a slider for each slide, you can see in the reference image:

Now, I have developed one of them like as you can in my shared link(Temp) but I need pagination for each slide just like in the design now I don’t understand how I make this, I have developed it but it’s actually for one slide now I need three as per the reference, can anyone help me please?

Here is my Read Only Link:

Hi @moiz_striker, Assuming there will be an equal number of Pagination element & Slider elements:

  var i = index;
  var t = $('.slider-pagination-inner').length
  $(this).find('.slider-pagination-number').text(index + 1)

I have a concern about the structure though, the fact that the pagination & slider has separate parents. Though if its not causing any issue, you can ignore it.

Hi @dennyhartanto, actually your code is running but it is not updating the numbers when I click on right arrow it stuck as you can see in pic

Actually I wanna update the numbers when the user will click on the arrow then the pagination numbers will update and the the total number of slides are 06 but it shows only 04 I actually don’t understand that how I make this one I’m stuck literally

Hi @dennyhartanto, are you there? can you help me?

Hey @moiz_striker, what plug in or library are you using for the slider? i think the way its setup is whats causing the code i provided not to work.

@dennyhartanto, I use this code and embed in body:

and you can see this code in my read only link

@moiz_striker got it, I think the main issue here is that your pagination live outside the slides. Without going into more custom code, I think the solution here is to include the pagination into the slide itself.

yeah I got your point @dennyhartanto, but the thing is if I will do this then when we change the slide then the pagination which will inside the slide it will also drag like will also slide but in the design I have to make that like when the user changes the slide like when the user will click on the arrow then the pagination will change