Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. Bug Reports
  3. Unable to reach marquee elements when hovering

Unable to reach marquee elements when hovering

Scheduled Pinned Locked Moved Bug Reports
3 Posts 2 Posters 343 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TYLM
    wrote on last edited by
    #1

    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:

    Capture d’écran 2023-12-12 à 21.31.51.png

    It works when I target the marquee and not the elements inside it though… :

    jQuery('.lay-marquee').hover(function(){
    	console.log("yay!");
    });
    

    Capture d’écran 2023-12-12 à 21.44.00.png

    Did someone else already have that problem?

    Thanks in advance for your help!

    Cheers :)

    1 Reply Last reply
    0
    • arminunruhA Offline
      arminunruhA Offline
      arminunruh
      Global Moderator
      wrote on last edited by arminunruh
      #2

      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>
      
      1 Reply Last reply
      0
      • T Offline
        T Offline
        TYLM
        wrote on last edited by
        #3

        Thank you so much, it works perfectly! 🙏

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        Online Users
        Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
        laytheme.com
        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Recent
        • Tags
        • Popular
        • Users
        • Search