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. cREATE AN EASE ANIMATION FOR MY SUBMENU

cREATE AN EASE ANIMATION FOR MY SUBMENU

Scheduled Pinned Locked Moved General Discussion
8 Posts 2 Posters 96 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.
  • P Offline
    P Offline
    PhilippHannappel
    wrote on last edited by
    #1

    Dear all Lay-themers,

    first of all, I really like this theme and think that it offers some great opportunities for websites. Thanks at this point.

    Now to my issue: I customized my desktop primary menu via CSS. Now it gets close to the intended look. What bothers me, is that the sub-menu just pops up on click. I would like to have an ease in animation, so it fades. I already discovered that the sub-menu on click is triggered by an event. But I don't know how to implement the wished result. Here I need your help.

    Thank you very much in advance.

    The website can be found here: http://neu.philipphannappel.de/ - Don't mind the subdomain, I am redesigning my current website. You find a sub-menu under the "Info" menu-item.

    1 Reply Last reply
    0
    • arminunruhA Offline
      arminunruhA Offline
      arminunruh
      Global Moderator
      wrote on last edited by
      #2
      .sub-menu{
      opacity: 0!important;
      transform: translateY(20px)!important;
      transition: all 300ms ease!important;
      }
      .menu-item-has-children.show-submenu-desktop > .sub-menu{
      transform: translateY(0px)!important;
      opacity: 1!important;
      }
      

      does that work?

      thanks!

      1 Reply Last reply
      0
      • P Offline
        P Offline
        PhilippHannappel
        wrote on last edited by
        #3

        Hello Armin,

        thank you very much for your quick response. Unfortunately no. Your code does not work. It still just pops up.

        1 Reply Last reply
        0
        • arminunruhA Offline
          arminunruhA Offline
          arminunruh
          Global Moderator
          wrote on last edited by
          #4
          nav.laynav ul.sub-menu{
          pointer-events:none!important;
          display:block!important;
          opacity: 0!important;
          transform: translateY(20px)!important;
          transition: all 300ms ease!important;
          }
          .menu-item-has-children.show-submenu-desktop > .sub-menu{
          pointer-events:auto!important;
          transform: translateY(0px)!important;
          opacity: 1!important;
          }
          

          does that work?

          P 1 Reply Last reply
          1
          • arminunruhA arminunruh
            nav.laynav ul.sub-menu{
            pointer-events:none!important;
            display:block!important;
            opacity: 0!important;
            transform: translateY(20px)!important;
            transition: all 300ms ease!important;
            }
            .menu-item-has-children.show-submenu-desktop > .sub-menu{
            pointer-events:auto!important;
            transform: translateY(0px)!important;
            opacity: 1!important;
            }
            

            does that work?

            P Offline
            P Offline
            PhilippHannappel
            wrote on last edited by PhilippHannappel
            #5

            Hej @arminunruh,

            yeah, this does its job. Thank you a lot.

            edit 2024/01/28:

            But: It just works if the ul.sub-menu is defined with display: block. Now I have the issue, that I get large transparent gaps in my menu list, where the sub-menus pop up if clicked. I already tried a little bit, but did not find a solution yet. Is it possible to define nav.laynav ul.sub-menu with display: block only when the click-event is triggered?

            Best.

            1 Reply Last reply
            0
            • arminunruhA Offline
              arminunruhA Offline
              arminunruh
              Global Moderator
              wrote on last edited by
              #6
              nav.laynav ul.sub-menu{
              pointer-events:none!important;
              display:flex!important;
              opacity: 0!important;
              transform: translateY(20px)!important;
              transition: all 300ms ease!important;
              }
              .menu-item-has-children.show-submenu-desktop > .sub-menu{
              pointer-events:auto!important;
              transform: translateY(0px)!important;
              opacity: 1!important;
              }
              

              maybe this?

              1 Reply Last reply
              0
              • P Offline
                P Offline
                PhilippHannappel
                wrote on last edited by
                #7

                Hej there,

                you just changed the display to flex, if I read this correctly. Unfortunately this does not work.

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

                  can you send your website address, /wp-admin/ username and password and a link to this topic to info@laytheme.com?

                  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