Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

counter leading 0 #2108

Open
Diemsy opened this issue Jul 3, 2024 · 1 comment
Open

counter leading 0 #2108

Diemsy opened this issue Jul 3, 2024 · 1 comment

Comments

@Diemsy
Copy link

Diemsy commented Jul 3, 2024

Good morning
Thank you first of all for this wonderful plugin which allows me to do what I want on my project.
I would like to know if it is possible to modify the counter so that it displays 01/10 rather than 1/10?
I've done a lot of research but haven't seen anything in this direction.
Thanks in advance

@dimsemenov
Copy link
Owner

You may disable the default indicator (via option counter:false). And implement your own.

How to add own element: https://photoswipe.com/adding-ui-elements/

Source of the default counter: https://github.com/dimsemenov/PhotoSwipe/blob/master/src/js/ui/counter-indicator.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants