Carousel - Numbers as custom cursor shown UNDER normal cursor
-
Hey there,
Really love how https://www.actualsource.work/ uses the carousel feature with the numbers on top of the image (ie 1/5)
I'd like to know how I can (1) have the numbers over the image (2) use it as a custom cursor (so the numbers follow the pointer) (3) have it live below the normal cursor (not instead of it)
Thank you so much!
-
Dea r@
probably a simple jQuery code was used which makes the number to follow the cursor.
There are plenty of those codes out there which you can use.
Also have a look here:
http://laytheme.com/documentation.html#custom-javascriptBest!
Marius
-
Up @arminunruh :)
Do you think you can make this feature?
best!Craig
-
that website used to be a lay theme website, now they custom coded it!
i think i wont code this feature :O
-
I managed to make the numbers as custom cursor thanks to chatgpt.
here's what it looks like : https://www.benoitlefeuvre.com/earthworks/here's the js code :
<script> document.addEventListener("mousemove", (e) => { const followTexts = document.querySelectorAll(".numbers"); const x = e.clientX; const y = e.clientY; // Update the position for each element with the class followTexts.forEach((followText) => { followText.style.left = x + "px"; followText.style.top = y + "px"; }); }); </script>then here's the css selector :
.lay-carousel-sink-parent .numbers { }I can't share my exact style because I have several hover states on the carousel, so you'll have to specify the css that works best for you.
To retain the next/prev slide function, you'll need to add an empty 10x10px png, for example, to the 'custom mouse cursor' parameters.I hope this helps !
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login