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. General Discussion
  3. Make div appear on Hover

Make div appear on Hover

Scheduled Pinned Locked Moved General Discussion
2 Posts 2 Posters 178 Views
  • 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.
  • B Offline
    B Offline
    beshepappà
    wrote on last edited by
    #1

    Hello, I was trying to make a text appear when I hover on a picture, I could achieve that by using the JS code:

    <script>
    jQuery(document).on("mouseenter", ".hoverme", function(event) {
    jQuery(".showme").show();
    });
    jQuery(document).on("mouseleave", ".hoverme", function(event) {
    jQuery(".showme").hide();
    });
    </script>

    it works fine but the only problem is that the element with class .showme is visible when I load the page, then If I hover the other element and take off the mouse it disappear.
    how can I make the element "showme" invisible when I first load the page?
    thank you!

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

      Dear @beshepappà
      you can use CSS classes to hide and remove the elements.

      Or call the function to hide ALL before you click.

      Best!

      Marius

      www.mariusjopen.world

      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