So I have an application that uses parallax and it is being executed once the document is ready
Javascript:
$(document).ready(function(){
parallax();
});
function parallax() {
$('.parallax').parallax();
}
navbar.html.erb:
<a href="/#about-us" onclick="parallax()">About Us</a>
<%= link_to "Why invest with us?", investor_portal_index_path %>
The problem is, when the page is redirected and you go back to the homepage parallax no longer works and the images aren't being loaded either. Is there a way to get around this? I tried calling the parallax function after an onClick event but that is not working either.
Thanks!