Lay Theme + scrollreveal js
-
Hello everyone,
I would like to use scrollreveal (https://scrollrevealjs.org) with lay theme, but I have some problems.
Scrollreveal works perfectly with the div (class=".box") that I integrate on the website via the "custom css and html" part, but it does not work at all on the div created in the lay theme grid.Do you know where the problem may come from?
The plugin may be simply incompatible with lay theme.Have a good day,
Samuel
-
Hi Samuel!
Did you have a look at the documentation about hot to embed Javascript code in Laytheme?
http://laytheme.com/documentation.html#custom-javascriptBecause your Lay Theme website is a "Single Page" JavaScript application you cannot just use
jQuery(document).ready(…)
to execute your js because the ready event only fires once when the website loads the first time.But you should use this instead:
window.laytheme.on("newpage", function(layoutObj, type, obj){ });
window.laytheme.on("newpageshown", function(layoutObj, type, obj){ });
Also I think, if you want to call ALL the div boxes on the page you should not use
sr.reveal('.box',500);
but
sr.reveal('div',500);
Does this solution work for you?
All the best!
Marius
-
Hello Marius,
Sorry for this very late response. The site was still not finished.Your solution works very well for me.
You can see the result at this address if you want:
http://chloenegre.com -
No worries Samuel! I am happy it works!
I don't answer or check forum DMs, please just post on the forum.
Try this to fix issues before you post:
Use the Search Feature. Maybe there is already a solution to your issue.
1. Update Lay Theme and all Lay Theme Addons
2. Disable all Plugins
3. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code ", click "Save Changes"
4. Now see if your problem solved itself
5. Go here, see if your problem is listed here:
Troubleshooting
When you post:
1. Post a link to where the problem is
2. If the problem is difficult to explain, post screenshots / link to a video to explain it