Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • 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. Addons
  3. Image hover addon set active

Image hover addon set active

Scheduled Pinned Locked Moved Addons
11 Posts 3 Posters 402 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.
  • RichardR Offline
    RichardR Offline
    Richard
    Global Moderator
    wrote on last edited by Richard
    #2

    Dear @gridch

    This would require you adding a class to the "imagehover region" through custom code.

    Sorry if difficult to see but here is the imagehover region holding the image sources in waiting (hidden):

    Screen Shot 2021-12-02 at 9.06.35 AM.png

    Then on "hover" the class show is added to both the lay-imagehover-region as well as the specific image in the list that relates to the link(text). In this case it being the second:

    Screen Shot 2021-12-02 at 9.06.44 AM.png

    By making sure that the class show is added permanently the image should stay visible, though i have not tested all this myself. If that doesn't work then you could use jQuery to always "hover" over the text you want:

    https://stackoverflow.com/questions/2290829/how-to-force-a-hover-state-with-jquery


    Hope this helps @gridch & best wishes 🌻
    Richard
    1 Reply Last reply
    0
    • G Offline
      G Offline
      gridch
      wrote on last edited by
      #3

      Hello Richard,

      Thank you for your help; I tried to force the image I want to keep permanently shown with the css "display: block;"

      This is my image:

      .lay-imagehover-region img[data-hoverimageid="652"] {
      margin-left:600px;
      margin-top: -88px;
      display: block;
      }

      But I don't know how to add a class that makes my image hover stays always visible or shown.

      I tried with the code css "display: visible"; but I can't find the solution.

      Do you know which could be the css code to achive it?

      Thanks in advance,

      Best

      1 Reply Last reply
      0
      • RichardR Offline
        RichardR Offline
        Richard
        Global Moderator
        wrote on last edited by
        #4

        Dear @gridch

        Look into the jQuery "AddClass"

        https://www.w3schools.com/jquery/html_addclass.asp

        You won't need the click function just the addClass:

        jQuery("define element").addClass("define class");
        

        Also make sure to wrap any JS Code in a Newpage Event as documented here:

        https://laytheme.com/documentation.html#custom-javascript


        Best wishes 🌻
        Richard
        1 Reply Last reply
        0
        • G Offline
          G Offline
          gridch
          wrote on last edited by
          #5

          Hello Richard,

          Thank you.

          I think I need to add the following code to custom CSS & HTML page, in custom <head> content:

          <script>
          window.laytheme.on("newpageshown", function(layoutObj, type, obj){
          console.log("layoutObj", layoutObj);
          console.log("type", type);
          console.log("obj", obj);
          });
          </script>

          And below I have to add the following:

          jQuery("define element").addClass("show");

          My addClass would be: "show" but which would be my element?

          Please I will appreciate your help.

          1 Reply Last reply
          0
          • G Offline
            G Offline
            gridch
            wrote on last edited by
            #6

            This is my website www.griseldaduch.com

            I would love to have my image from text "Botanicals" shown permanently.

            1 Reply Last reply
            0
            • G Offline
              G Offline
              gridch
              wrote on last edited by
              #7

              I didn't fΒ‘nd any solution... Please could you help me out?

              Thanks in advance!

              1 Reply Last reply
              0
              • RichardR Offline
                RichardR Offline
                Richard
                Global Moderator
                wrote on last edited by
                #8

                Dear @gridch

                You could try:

                .lay-imagehover-region, img[data-hoverimageid="211"] {
                    opacity:1 !important;
                }
                
                
                .row-0{
                    z-index:20;
                }
                

                The row-0 z-index is needed for to keep your menu in front:
                Screen Shot 2021-12-21 at 10.18.32 AM.png

                You will see the downside of this method is that to get the image visible we must set the image hover region to 1 opacity & the img itself. This means the last hovered image remains visible. Test to see 🌝


                Merry Christmas πŸŽ„
                Richard
                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  gridch
                  wrote on last edited by
                  #9

                  Thank you very much! That worked!

                  Merry Christmas for you as well. :))

                  1 Reply Last reply
                  0
                  • RichardR Offline
                    RichardR Offline
                    Richard
                    Global Moderator
                    wrote on last edited by
                    #10

                    Great to hear all is well @gridch have a wonderful new years and best wishes for 2022! ⭐️

                    1 Reply Last reply
                    1
                    • S Offline
                      S Offline
                      Simonabele
                      wrote on last edited by
                      #11

                      Finally I found a website which achieved the effect I was searching for months now. Unfortunately I did not get it working on my own Lay-theme based website. Is there something I am missing.

                      I try to achieve this effect with hover images centered and fullscreen. In front I have a list of different project links, which should trigger different images.
                      Would be really looking forward to any help.

                      https://simonabele.de/en/category/motion-picture/

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


                      I also code custom websites or custom Lay features.
                      πŸ’Ώ Email me here: πŸ’Ώ
                      info@laytheme.com

                      Before you post:
                      1. When using a WordPress Cache plugin, disable it or clear your cache.
                      2. Update Lay Theme and all Lay Theme Addons
                      3. Disable all Plugins
                      4. Go to Lay Options β†’ Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

                      This often solves issues you might run into

                      When you post:
                      1. Post a link to where the problem is
                      2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
                      3. If the problem is difficult to explain, post screenshots / link to a video to explain it
                      Online Users
                      dmncnD
                      dmncn
                      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