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. Addons
  3. Image hover addon set active

Image hover addon set active

Scheduled Pinned Locked Moved Addons
11 Posts 3 Posters 2.0k 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
    G
    gridch
    wrote on 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
    • RichardR
      RichardR
      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
        G
        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
          RichardR
          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
            G
            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
              G
              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
                G
                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
                  RichardR
                  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
                    G
                    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
                      RichardR
                      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
                        S
                        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

                        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
                        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