Custom Js not working with Fullscreen Slider Slider
-
Hej guys,
i want a specific div to fade out on scroll. I tried the following and it works but only when the fullscreen slider is set up in free-scroll mode:
<script>
jQuery(window).scroll(function() { if (jQuery(this).scrollTop()>0) { jQuery('.specific-div').fadeOut(500); } });
</script>
I want the Fullscreen Slider to work in Auto-Mode. But then the Custom JS is not working anymore. Do you have any ideas what part of the Auto-Mode is not working with the Custom Code?
Thanks and keep up the great work!
Bastiedit:
For a better understanding, here's my websiteI want the overlay that shows up when you click on info to disappear if the you scroll in any direction.
-
edit:
If I tick "Show Scrollbar" to be active the desired effects is also working. -
Dear @kalamakumaran
Scrolling once having clicked "info" does make the ".specific-div" fade away,
Am i missing something or have you solved the issue?The "X" "close-button" also needs to be asked to fade away by jQuery.
Best wishes
Richard -
Yeah sure, it works when the fullscreen slider is set to free scroll. But when I choose auto scroll (snap to scroll) both, the info container and the x-Button don‘t fade out....
-
Dear @kalamakumaran
The Page in Question shows me a 404 error,
Apologies for not replying sooner, would love to come to a solution :)Let me Know
Best Wishes
Richard -
Dear @Richard-Keith
i recently moved the website to another domain.
I found a workaround myself.
That did it for the desktop version:<script> window.laytheme.on("newpageshown", function(layoutObj, type, obj){ jQuery('html').bind('mousewheel DOMMouseScroll', function (e) { jQuery('div').fadeOut(100) }); }); </script>
And that one for touch devices:
<script> window.laytheme.on("newpageshown", function(layoutObj, type, obj){ jQuery(document).on('touchmove', function() { jQuery('div').fadeOut(100) }); }); </script>
But thanks for coming back to me ;)
Here's the new one: www.arch.bastianlandgraf.de -
Dear @kalamakumaran
Great to hear :)
Thank you for posting a clear example of your solution as well, this really helps others in the Forum Community.Best wishes & good luck for the future.
Sincerely
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