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. General Discussion
  3. Background images hovering link, images on hover

Background images hovering link, images on hover

Scheduled Pinned Locked Moved General Discussion
hoverfullscreenhover imagebackgroundportfolio
4 Posts 2 Posters 500 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.
  • S Offline
    S Offline
    Simonabele
    wrote on last edited by Simonabele
    #1

    Hi everyone,
    I hope my Problem can be solved.
    At my starting-page for my filmmaking portfolio I want to show different projects, being represented by the background image (full screen). As the image-hover plugin from lay theme already gets quite close to what I want to achieve, there is still some little things that wonβ€˜t work. As soon as I move the cursor away, obviously the standard background image appears and the image hover full screen is gone. I want to keep the full screen backgroundimage which was lastly hovered, before hovering a fresh one.

    To better understand, please head over to my website.
    https://simonabele.de/en/

    Thanks a lot for your help and have a great day.
    Simon

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

      Dear Simon

      @Simonabele

      This will take some custom coding but it's a worthy pursuit & good idea 🌝

      The main thing is to understand how the images appear and then mimic that but slightly differently.
      There is the lay-imagehover-region. This is the parent container that holds all the images waiting behind the scenes.

      The images and the container have an opacity of zero - opacity:0;

      When you hover or 'mouseover' a project link the class show is added to the image hover region as well as the image that relates to that link.

      You can see this behaviour here:
      Screen Shot 2022-05-24 at 3.55.52 PM.png
      And now when 'mouseover':
      Screen Shot 2022-05-24 at 3.56.00 PM.png

      When the class show is added to these elements it comes with new CSS instructions.

      This CSS:

      .lay-imagehover-region img {
          opacity: 0 !important;
          position: fixed;
          pointer-events: none;
          top: 0;
          left: 0;
      }
      

      Changes to:

      .lay-imagehover-region img.show {
          opacity: 1 !important;
          position: fixed;
          pointer-events: none;
          top: 0;
          left: 0;
      }
      

      Notice the opacity change to 1 (invisible to visible) & the class 'show' added to the CSS selections.

      So to breakdown - On mouseover add 'show' and when you remove the mouse - remove the class show

      For you to achieve your result you need to say:

      On mouseover add "show" without the "remove show". 🌝

      https://laytheme.com/documentation/custom-css-styling.html

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

      https://stackoverflow.com/questions/16821564/how-to-add-remove-class-on-mouseover-mouseout-jquery-hover

      Just remember you dont need the removeClass function.


      Best wishes
      Richard
      S 1 Reply Last reply
      1
      • RichardR Richard

        Dear Simon

        @Simonabele

        This will take some custom coding but it's a worthy pursuit & good idea 🌝

        The main thing is to understand how the images appear and then mimic that but slightly differently.
        There is the lay-imagehover-region. This is the parent container that holds all the images waiting behind the scenes.

        The images and the container have an opacity of zero - opacity:0;

        When you hover or 'mouseover' a project link the class show is added to the image hover region as well as the image that relates to that link.

        You can see this behaviour here:
        Screen Shot 2022-05-24 at 3.55.52 PM.png
        And now when 'mouseover':
        Screen Shot 2022-05-24 at 3.56.00 PM.png

        When the class show is added to these elements it comes with new CSS instructions.

        This CSS:

        .lay-imagehover-region img {
            opacity: 0 !important;
            position: fixed;
            pointer-events: none;
            top: 0;
            left: 0;
        }
        

        Changes to:

        .lay-imagehover-region img.show {
            opacity: 1 !important;
            position: fixed;
            pointer-events: none;
            top: 0;
            left: 0;
        }
        

        Notice the opacity change to 1 (invisible to visible) & the class 'show' added to the CSS selections.

        So to breakdown - On mouseover add 'show' and when you remove the mouse - remove the class show

        For you to achieve your result you need to say:

        On mouseover add "show" without the "remove show". 🌝

        https://laytheme.com/documentation/custom-css-styling.html

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

        https://stackoverflow.com/questions/16821564/how-to-add-remove-class-on-mouseover-mouseout-jquery-hover

        Just remember you dont need the removeClass function.


        Best wishes
        Richard
        S Offline
        S Offline
        Simonabele
        wrote on last edited by
        #3

        @Richard said in Background images hovering link, images on hover:

        .lay-imagehover-region img

        Thanks a lot, Richard !
        I really got to understand the image-hover plugin.

        When trying to customize via custom css&html I did not get that lucky yet.

        Bildschirmfoto 2022-05-24 um 22.20.20.png

        As you said I removed the "removeClass" function within jQuery and tried to implement "addClass" --> show.

        What am I doing wrong though.

        Bets regards,
        Simon

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

          Dear Simon

          @Simonabele

          Sorry that i wont be able to go into custom coding deeper with you at the moment, but you are doing awesome 🌝

          The class show must also be added to the correct image in the container as well, it also has an opacity:0.

          You might also want to just work with the current code native to Lay Theme and stop it's remove class from the source.
          ( not really meant to suggest this but changing source code...)


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