Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When I click on link I get blank page (the html code is there) #378

Open
giacomomasseron opened this issue Oct 30, 2019 · 0 comments
Open

Comments

@giacomomasseron
Copy link

Hi,
I do not why when i click on link I get blank page, even if the html code of the page is there. If I simply press F5 the page shows itself well.

I start the plugin with this code:

var smoothState = $('#page').smoothState(options).data('smoothState');

With these options:

var options = {
	prefetch: true,
	prefetchOn: 'mouseover',
	cacheLength: 100,
	scroll: true, 
	blacklist: '.default-link' && '.show-gallery',
	forms: 'contactForm',
	onStart: {
		duration:210, // Duration of our animation
		render: function ($container) {
		$container.addClass('is-exiting');// Add your CSS animation reversing class
            $('.menu, .menu-hider').removeClass('menu-active');
			$('.loader-main').removeClass('loader-inactive');
			return false;
		}
	},
	onReady: {
		duration: 50,
		render: function ($container, $newContent) {
			$container.removeClass('is-exiting');// Remove your CSS animation reversing class
			$container.html($newContent);// Inject the new content
            setTimeout(init_template, 0)//Timeout required to properly initiate all JS Functions. 
			$('.loader-main').removeClass('loader-inactive');		
		}
	},
	onAfter: function($container, $newContent) {
        $('.loader-main').addClass('loader-inactive');	
	},
    alterRequest: function (request) {
        request.headers = {
            'Authorization': "Bearer " + window.access_token
        };
        return request;
    },
};

The page is a div inside the body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant