Unable to reach marquee elements when hovering
-
Hello everyone,
I'm having an issue with the marquee. I try to toggle a div when I hover the linked images of my marquee but nothing happens…
I tested it, but it seems to be impossible to reach the “a” elements – or even the “img” – inside the marquee for some reason :
jQuery('.lay-marquee a').hover(function(){ console.log("yay!"); });This doesn't work either:
jQuery('.lay-marquee > div > div > div > a').hover(function(){ console.log("yay!"); });Here, I circled the image I hovered, and we can see that nothing is happening in the console regarding the hovering:

It works when I target the marquee and not the elements inside it though… :
jQuery('.lay-marquee').hover(function(){ console.log("yay!"); });
Did someone else already have that problem?
Thanks in advance for your help!
Cheers :)
-
follow this tutorial:
https://laytheme.com/documentation/custom-javascript.html#binding-click-events
instead of .hover do
<script> jQuery(document).on("mouseenter", ".lay-marquee a", function(event) { console.log("yay!"); }); </script> -
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