summaryrefslogtreecommitdiff
path: root/src/lightbox.js
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-09-16 15:24:34 +0800
committerEltrac <hi@guhub.cn>2025-09-16 15:24:34 +0800
commit00e7eab4eb65cbb4e396837281ebf4a38cdcd7ad (patch)
tree5fb262c51228836193e56773ce48aaf21f6ddb3a /src/lightbox.js
parent11e0bbedadcd950bb17bf4d97adfd0afb0bce713 (diff)
feat: shows zoom-in cursor when hovering on images
Diffstat (limited to 'src/lightbox.js')
-rw-r--r--src/lightbox.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lightbox.js b/src/lightbox.js
index f7dd8b3..22cf0ff 100644
--- a/src/lightbox.js
+++ b/src/lightbox.js
@@ -30,6 +30,7 @@ export default class LightBox {
this.images.forEach(image => {
if (image.tagName !== 'IMG') return;
image.id = crypto.randomUUID(); // generate unique id for each image
+ image.style.cursor = 'zoom-in';
image.addEventListener('click', () => this.open(image)); // click image to open lightbox
});
}