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 393 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.
  • G Offline
    G Offline
    gridch
    wrote on Nov 30, 2021, 8:54 PM last edited by
    #1

    Hello!

    I would love to achieve that the firt image of my links that are under image hover would be active; I mean always visible.

    Is there a way to set an image hover id always visible? Not only when hovering in it.

    I will appreciate some help. Thank you! :)

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Richard
      Global Moderator
      wrote on Dec 1, 2021, 8:12 PM last edited by Richard Dec 1, 2021, 3:16 PM
      #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 Dec 1, 2021, 10:19 PM 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
        • R Offline
          R Offline
          Richard
          Global Moderator
          wrote on Dec 2, 2021, 6:35 PM 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 Dec 2, 2021, 10:29 PM 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 Dec 2, 2021, 10:36 PM 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 Dec 20, 2021, 11:00 AM 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
                • R Offline
                  R Offline
                  Richard
                  Global Moderator
                  wrote on Dec 20, 2021, 9:25 PM 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 Dec 21, 2021, 3:05 PM last edited by
                    #9

                    Thank you very much! That worked!

                    Merry Christmas for you as well. :))

                    1 Reply Last reply
                    0
                    • R Offline
                      R Offline
                      Richard
                      Global Moderator
                      wrote on Jan 3, 2022, 6:39 AM 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 May 23, 2022, 6:46 PM 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
                        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