Hiding the Intro by clicking on another element
-
Dear dear Laytheme team,
I have an intro page, on which the nav menu is also visible:
http://avishay.wwwnlsrc4.supercp.comThe "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 tweaksThanks a lot,
Sasha -
Dear Sasha
@spontans
The Intro region will disappear when the class
hide
is added.Active:
Hidden:
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 👍
Have a wonderful day Sasha
Richard
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- 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:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it