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. Hiding the Intro by clicking on another element

Hiding the Intro by clicking on another element

Scheduled Pinned Locked Moved General Discussion
4 Posts 2 Posters 63 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
    spontans
    wrote on last edited by
    #1

    Dear dear Laytheme team,

    I have an intro page, on which the nav menu is also visible:
    http://avishay.wwwnlsrc4.supercp.com

    The "Art" menu item is selected as it's the homepage, and I would like to somehow add a "click" function to it that will cause the intro go down (like on scroll down or clicking on the intro itself.)

    Could you kindly guide me on how to do it?
    I already have a custom js file where I can implement some tweaks

    Thanks a lot,
    Sasha

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

      Dear Sasha

      @spontans

      The Intro region will disappear when the class hide is added.

      Active:
      Screen Shot 2022-03-24 at 6.32.23 PM.png

      Hidden:
      Screen Shot 2022-03-24 at 6.32.33 PM.png

      So you would want some code saying

      "When you click on the menu item: art then add a class to the intro region called hide"

      Have not tested this but should do or at least very close to solution:

      jQuery(".menu-item-13").click(function(){
        jQuery("#intro-region").addClass("hide")
      })
      

      Also please read about applying custom Javascript to Lay Theme šŸ‘

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


      Have a wonderful day Sasha
      Richard
      1 Reply Last reply
      0
      • S Offline
        S Offline
        spontans
        wrote on last edited by
        #3

        Hi Richard,

        It worked!
        Thanks so much for this detailed and kind explanation.
        I didn't know that Lay now has an option to inject js through WordPress.. It wasn't like this before! good to know.

        Have a a good weekend,
        Sasha

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

          Dear Sasha

          @spontans

          Because you can add raw HTML CSS and JS into Lay Theme, so much is possible šŸŒ have a wonderful weekend!

          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