how to show element like .sitetitle but on specific scroll position? is it possible?
-
how to show element like .sitetitle but on specific scroll position? is it possible?
for example: https://www.zerodois.com
Thx :)
-
arminunruh Global Moderatorwrote on Jan 7, 2025, 1:01 AM last edited by arminunruh Jan 6, 2025, 8:01 PM
u mean u want it to fade out like this when at the bottom?
ah i see it also shows up at the top after some scrollingfirst hide:
put this in custom css.sitetitle{ opacity: 0; }
put this in custom head content
<script> jQuery(window).on('scroll', function(){ if(window.scrollY > 400){ jQuery('.sitetitle').css('opacity', 1) } }) //if u want to: hide it again when going to a new page: window.laytheme.on('newpageshown', function(){ jQuery('.sitetitle').css('opacity', 0) }) </script>
Enter this css in "lay options" -> "custom css & html"
-
Thank you Armin! :)
Jan 6, 2025, 10:01 PM
1/3
Jan 7, 2025, 11:19 AM
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
Online Users
Forgot your key, lost your files, need a previous Lay Theme or Addon version?
Go to www.laykeymanager.com